]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/vc1dec.c
avcodec/hqx: Use av_clip_uintp2()
[ffmpeg] / libavcodec / vc1dec.c
index 70694471ce904ff0262b062f19e6ee5c7ff4176c..6c47d45dbdbd37165dff2492e62408f33188103b 100644 (file)
@@ -483,6 +483,9 @@ static av_cold int vc1_decode_init(AVCodecContext *avctx)
         }
 
         buf2  = av_mallocz(avctx->extradata_size + FF_INPUT_BUFFER_PADDING_SIZE);
+        if (!buf2)
+            return AVERROR(ENOMEM);
+
         start = find_next_marker(start, end); // in WVC1 extradata first byte is its size, but can be 0 in mkv
         next  = start;
         for (; next < end; start = next) {