Mercurial > libavcodec.hg
comparison 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 |
comparison
equal
deleted
inserted
replaced
| 2385:4605a8b188c3 | 2386:8d1983254e28 |
|---|---|
| 185 | 185 |
| 186 /* copy overreaded bytes from last frame into buffer */ | 186 /* copy overreaded bytes from last frame into buffer */ |
| 187 for(; pc->overread>0; pc->overread--){ | 187 for(; pc->overread>0; pc->overread--){ |
| 188 pc->buffer[pc->index++]= pc->buffer[pc->overread_index++]; | 188 pc->buffer[pc->index++]= pc->buffer[pc->overread_index++]; |
| 189 } | 189 } |
| 190 | 190 |
| 191 /* flush remaining if EOF */ | |
| 192 if(!*buf_size && next == END_NOT_FOUND){ | |
| 193 next= 0; | |
| 194 } | |
| 195 | |
| 191 pc->last_index= pc->index; | 196 pc->last_index= pc->index; |
| 192 | 197 |
| 193 /* copy into buffer end return */ | 198 /* copy into buffer end return */ |
| 194 if(next == END_NOT_FOUND){ | 199 if(next == END_NOT_FOUND){ |
| 195 pc->buffer= av_fast_realloc(pc->buffer, &pc->buffer_size, (*buf_size) + pc->index + FF_INPUT_BUFFER_PADDING_SIZE); | 200 pc->buffer= av_fast_realloc(pc->buffer, &pc->buffer_size, (*buf_size) + pc->index + FF_INPUT_BUFFER_PADDING_SIZE); |
