diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2004-12-12 14:19:54 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2004-12-12 14:19:54 +0000 |
commit | f48c0551caea82150111eb10829117ae13f4d87a (patch) | |
tree | e03048fa7fa9213fc15fa7e36aa9362e854fb1d7 | |
parent | 732ce18eab8c409c92cf89b16e2d1d8e7113d7cd (diff) | |
download | ffmpeg-f48c0551caea82150111eb10829117ae13f4d87a.tar.gz |
flush remaining data from parser at EOF
Originally committed as revision 3748 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r-- | libavcodec/parser.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/libavcodec/parser.c b/libavcodec/parser.c index b15c1c4dfa..70552d4c57 100644 --- a/libavcodec/parser.c +++ b/libavcodec/parser.c @@ -187,7 +187,12 @@ int ff_combine_frame(ParseContext *pc, int next, uint8_t **buf, int *buf_size) 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 */ |