]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/parser.c
h264: use must_reinit to simplify code
[ffmpeg] / libavcodec / parser.c
index 2e204e2c2a6ad65afd0c06b2a01597efdc1b7aee..3b4715035a12f6f15937694e6e88ac3789261352 100644 (file)
@@ -253,8 +253,9 @@ 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 );
+        if (next > -FF_INPUT_BUFFER_PADDING_SIZE)
+            memcpy(&pc->buffer[pc->index], *buf,
+                   next + FF_INPUT_BUFFER_PADDING_SIZE);
         pc->index = 0;
         *buf= pc->buffer;
     }