Merge commit 'a09c499a2e25ded575cb9f37528384402be86ad8'
authorMichael Niedermayer <michaelni@gmx.at>
Wed, 29 Apr 2015 14:49:04 +0000 (16:49 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Wed, 29 Apr 2015 14:49:47 +0000 (16:49 +0200)
* commit 'a09c499a2e25ded575cb9f37528384402be86ad8':
  rawenc: properly allocate coded_frame

Conflicts:
libavcodec/rawenc.c

See: 881f96c4c2ef0c0162f63a370cbfff3c1e1feb2a
Merged-by: Michael Niedermayer <michaelni@gmx.at>
1  2 
libavcodec/rawenc.c

@@@ -35,8 -35,12 +35,11 @@@ static av_cold int raw_encode_init(AVCo
  {
      const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(avctx->pix_fmt);
  
-     avctx->coded_frame = av_frame_alloc();
+     avctx->coded_frame            = av_frame_alloc();
+     if (!avctx->coded_frame)
+         return AVERROR(ENOMEM);
      avctx->coded_frame->pict_type = AV_PICTURE_TYPE_I;
 -    avctx->coded_frame->key_frame = 1;
      avctx->bits_per_coded_sample = av_get_bits_per_pixel(desc);
      if(!avctx->codec_tag)
          avctx->codec_tag = avcodec_pix_fmt_to_codec_tag(avctx->pix_fmt);