Mercurial > libavcodec.hg
changeset 3087:526bc949ef31 libavcodec
simplify
author | michael |
---|---|
date | Sat, 04 Feb 2006 22:18:45 +0000 |
parents | befacb1cb573 |
children | 03582724f3de |
files | mpegvideo.c |
diffstat | 1 files changed, 4 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/mpegvideo.c Sat Feb 04 20:32:02 2006 +0000 +++ b/mpegvideo.c Sat Feb 04 22:18:45 2006 +0000 @@ -237,20 +237,18 @@ if(tmp == 0x100 || p==end) return p; } - p--; // need to recheck or might miss one - end--; // we need the byte after 00 00 01 too while(p<end){ - if (p[ 0] > 1) p+= 3; - else if(p[-1] ) p+= 2; - else if(p[-2]|(p[0]-1)) p++; + if (p[-1] > 1 ) p+= 3; + else if(p[-2] ) p+= 2; + else if(p[-3]|(p[-1]-1)) p++; else{ p++; break; } } - p= FFMIN(p, end)-3; + p= FFMIN(p, end)-4; *state= be2me_32(unaligned32(p)); return p+4;