summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libavcodec/h264.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libavcodec/h264.c b/libavcodec/h264.c
index 4fcdb75bce..fd70b0f231 100644
--- a/libavcodec/h264.c
+++ b/libavcodec/h264.c
@@ -8059,7 +8059,8 @@ static int h264_parse(AVCodecParserContext *s,
return buf_size;
}
- if(next<0){
+ if(next<0 && next != END_NOT_FOUND){
+ assert(pc->last_index + next >= 0 );
find_frame_end(h, &pc->buffer[pc->last_index + next], -next); //update state
}
}