Mercurial > libavcodec.hg
diff parser.c @ 2386:8d1983254e28 libavcodec
flush remaining data from parser at EOF
author | michael |
---|---|
date | Sun, 12 Dec 2004 14:19:54 +0000 |
parents | d02fb928ca44 |
children | 429c1eedeee9 |
line wrap: on
line diff
--- a/parser.c Sat Dec 11 18:33:18 2004 +0000 +++ b/parser.c Sun Dec 12 14:19:54 2004 +0000 @@ -187,7 +187,12 @@ for(; pc->overread>0; pc->overread--){ pc->buffer[pc->index++]= pc->buffer[pc->overread_index++]; } - + + /* flush remaining if EOF */ + if(!*buf_size && next == END_NOT_FOUND){ + next= 0; + } + pc->last_index= pc->index; /* copy into buffer end return */