]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/dump_extradata_bsf.c
avfilter/vf_mcdeint: avoid uninitilaized fields in AVPacket
[ffmpeg] / libavcodec / dump_extradata_bsf.c
index 2dcbf8fdad0f7b412fc9ff88c6d95806bf57c6ae..568f92097983c8e582583e6995c79d4a271bc713 100644 (file)
@@ -37,6 +37,8 @@ static int dump_extradata(AVBitStreamFilterContext *bsfc, AVCodecContext *avctx,
             int size= buf_size + avctx->extradata_size;
             *poutbuf_size= size;
             *poutbuf= av_malloc(size + FF_INPUT_BUFFER_PADDING_SIZE);
+            if (!*poutbuf)
+                return AVERROR(ENOMEM);
 
             memcpy(*poutbuf, avctx->extradata, avctx->extradata_size);
             memcpy((*poutbuf) + avctx->extradata_size, buf, buf_size + FF_INPUT_BUFFER_PADDING_SIZE);