# HG changeset patch # User michael # Date 1230057104 0 # Node ID 489c8d652fffeed73eaa45e23815028753e9ec9c # Parent 8621deaff8dcc1eed523a6a1db0de59b3c42aadd Optimize esc removal code. diff -r 8621deaff8dc -r 489c8d652fff h264.c --- a/h264.c Tue Dec 23 18:27:06 2008 +0000 +++ b/h264.c Tue Dec 23 18:31:44 2008 +0000 @@ -1423,21 +1423,28 @@ } //printf("decoding esc\n"); - si=di=0; - while(si3){ + dst[di++]= src[si++]; + dst[di++]= src[si++]; + }else if(src[si]==0 && src[si+1]==0){ if(src[si+2]==3){ //escape dst[di++]= 0; dst[di++]= 0; si+=3; continue; }else //next start code - break; + goto nsc; } dst[di++]= src[si++]; } + while(si