]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/parser.c
Merge remote-tracking branch 'qatar/master'
[ffmpeg] / libavcodec / parser.c
index a85db1a02f089707872e721caa3c1db1bc0d4f5d..127ba8bd3dea4fdd76263f67fef14f0d8edec803 100644 (file)
@@ -261,6 +261,7 @@ int ff_combine_frame(ParseContext *pc, int next, const uint8_t **buf, int *buf_s
         if(!new_buffer)
             return AVERROR(ENOMEM);
         pc->buffer = new_buffer;
+        if(FF_INPUT_BUFFER_PADDING_SIZE > -next)
         memcpy(&pc->buffer[pc->index], *buf, next + FF_INPUT_BUFFER_PADDING_SIZE );
         pc->index = 0;
         *buf= pc->buffer;