summaryrefslogtreecommitdiff
path: root/libavcodec/parser.c
diff options
context:
space:
mode:
Diffstat (limited to 'libavcodec/parser.c')
-rw-r--r--libavcodec/parser.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/libavcodec/parser.c b/libavcodec/parser.c
index 2e204e2c2a..3b4715035a 100644
--- a/libavcodec/parser.c
+++ b/libavcodec/parser.c
@@ -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;
}