# HG changeset patch # User gpoirier # Date 1222975466 0 # Node ID 38d577c3cb60b528ec11cc5b600f6e53f1167347 # Parent 5be50ba0ce24a46ddeb26ca25192180ad05cc885 fix warning reported by Intel C compiler: libavcodec/h264_parser.c(77): warning #589: transfer of control bypasses initialization of: variable "v" (declared at line 58) goto found; This new form also improves readability. Patch by Diego 'Flameeyes' Petten %flameeyes A gmail P com% diff -r 5be50ba0ce24 -r 38d577c3cb60 h264_parser.c --- a/h264_parser.c Thu Oct 02 19:20:11 2008 +0000 +++ b/h264_parser.c Thu Oct 02 19:24:26 2008 +0000 @@ -59,10 +59,7 @@ 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 @@ } 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,