summaryrefslogtreecommitdiff
path: root/libavcodec/h264_parser.c
diff options
context:
space:
mode:
Diffstat (limited to 'libavcodec/h264_parser.c')
-rw-r--r--libavcodec/h264_parser.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/libavcodec/h264_parser.c b/libavcodec/h264_parser.c
index 7a85d770cf..73b156964c 100644
--- a/libavcodec/h264_parser.c
+++ b/libavcodec/h264_parser.c
@@ -59,10 +59,7 @@ int ff_h264_find_frame_end(H264Context *h, const uint8_t *buf, int buf_size)
if(v==7 || v==8 || v==9){
if(pc->frame_start_found){
i++;
-found:
- pc->state=7;
- pc->frame_start_found= 0;
- return i-(state&5);
+ goto found;
}
}else if(v==1 || v==2 || v==5){
if(pc->frame_start_found){
@@ -80,6 +77,11 @@ found:
}
pc->state= state;
return END_NOT_FOUND;
+
+found:
+ pc->state=7;
+ pc->frame_start_found= 0;
+ return i-(state&5);
}
static int h264_parse(AVCodecParserContext *s,