Merge commit 'e524f37356156893cae50fc46451bd4a6198703d'

* commit 'e524f37356156893cae50fc46451bd4a6198703d':
  asv: Check memory allocation

Merged-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2015-06-01 01:41:02 +02:00
commit 7110b024a9

View File

@ -333,6 +333,8 @@ static av_cold int encode_init(AVCodecContext *avctx)
avctx->global_quality / 2) / avctx->global_quality;
avctx->extradata = av_mallocz(8);
if (!avctx->extradata)
return AVERROR(ENOMEM);
avctx->extradata_size = 8;
((uint32_t *) avctx->extradata)[0] = av_le2ne32(a->inv_qscale);
((uint32_t *) avctx->extradata)[1] = av_le2ne32(AV_RL32("ASUS"));