Originally committed as revision 24598 to svn://svn.ffmpeg.org/ffmpeg/trunk
av_md5_init(s->md5ctx);
streaminfo = av_malloc(FLAC_STREAMINFO_SIZE);
+ if (!streaminfo)
+ return AVERROR(ENOMEM);
write_streaminfo(s, streaminfo);
avctx->extradata = streaminfo;
avctx->extradata_size = FLAC_STREAMINFO_SIZE;
s->min_framesize = s->max_framesize;
avctx->coded_frame = avcodec_alloc_frame();
+ if (!avctx->coded_frame)
+ return AVERROR(ENOMEM);
avctx->coded_frame->key_frame = 1;
return 0;