summaryrefslogtreecommitdiff
path: root/ffmpeg.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2008-07-13 21:39:18 +0000
committerMichael Niedermayer <michaelni@gmx.at>2008-07-13 21:39:18 +0000
commitbd6754aa796954aa5b95f11acc1a23e3abcfb948 (patch)
tree03f4b9a2ca21f1e7ac4083f69bb8738cb60b2281 /ffmpeg.c
parentf96905899866738460d52241ddec729aa1ddeca1 (diff)
On EOF keep calling the decoders until they do not output anything
anymore, instead of just once. Originally committed as revision 14220 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'ffmpeg.c')
-rw-r--r--ffmpeg.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/ffmpeg.c b/ffmpeg.c
index 48ce906ad4..4d77405677 100644
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -1139,7 +1139,9 @@ static int output_packet(AVInputStream *ist, int ist_index,
len = pkt->size;
ptr = pkt->data;
- while (len > 0) {
+
+ //while we have more to decode or while the decoder did output something on EOF
+ while (len > 0 || (!pkt && ist->next_pts != ist->pts)) {
handle_eof:
ist->pts= ist->next_pts;