]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/h264_mp4toannexb_bsf.c
configure: aac encoder requires lpc
[ffmpeg] / libavcodec / h264_mp4toannexb_bsf.c
index 1693989977e2c0f5e0c3d8a49139c66ba68e514d..a5da84a7af1754b6814b7cd8ab2cabb374fa4a63 100644 (file)
@@ -201,7 +201,7 @@ static int h264_mp4toannexb_filter(AVBitStreamFilterContext *bsfc,
         buf      += ctx->length_size;
         unit_type = *buf & 0x1f;
 
-        if (buf + nal_size > buf_end || nal_size < 0)
+        if (nal_size > buf_end - buf || nal_size < 0)
             goto fail;
 
         if (unit_type == 7)