]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/h264_mp4toannexb_bsf.c
configure: aac encoder requires lpc
[ffmpeg] / libavcodec / h264_mp4toannexb_bsf.c
index e919360f96f1303105bfe1bde78994c492d1f8f8..a5da84a7af1754b6814b7cd8ab2cabb374fa4a63 100644 (file)
@@ -57,7 +57,7 @@ static int alloc_and_copy(uint8_t **poutbuf, int *poutbuf_size,
 
     *poutbuf_size += sps_pps_size + in_size + nal_header_size;
     if ((err = av_reallocp(poutbuf,
-                           *poutbuf_size + FF_INPUT_BUFFER_PADDING_SIZE)) < 0) {
+                           *poutbuf_size + AV_INPUT_BUFFER_PADDING_SIZE)) < 0) {
         *poutbuf_size = 0;
         return err;
     }
@@ -178,7 +178,7 @@ static int h264_mp4toannexb_filter(AVBitStreamFilterContext *bsfc,
         if (args && strstr(args, "private_spspps_buf"))
             ctx->private_spspps = 1;
 
-        ret = h264_extradata_to_annexb(ctx, avctx, FF_INPUT_BUFFER_PADDING_SIZE);
+        ret = h264_extradata_to_annexb(ctx, avctx, AV_INPUT_BUFFER_PADDING_SIZE);
         if (ret < 0)
             return ret;
         ctx->length_size      = ret;
@@ -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)