aboutsummaryrefslogtreecommitdiffstats
path: root/ffplay.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2009-01-07 20:45:39 +0000
committerMichael Niedermayer <michaelni@gmx.at>2009-01-07 20:45:39 +0000
commit600a331c2718a5aed9506e395d6cf18956a28b55 (patch)
treead567e4816aa38913dd355761988daf0e7f74ce0 /ffplay.c
parent9f06bd9e96dca6bc1f67c748d03f017cc98adf13 (diff)
downloadffmpeg-600a331c2718a5aed9506e395d6cf18956a28b55.tar.gz
Inject NULL packets into the video packet que at EOF to force all delayed
frames to be output. Originally committed as revision 16484 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'ffplay.c')
-rw-r--r--ffplay.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/ffplay.c b/ffplay.c
index 4f8a803b9c..12190dacfa 100644
--- a/ffplay.c
+++ b/ffplay.c
@@ -2063,12 +2063,19 @@ static int decode_thread(void *arg)
/* if the queue are full, no need to read more */
if (is->audioq.size > MAX_AUDIOQ_SIZE ||
is->videoq.size > MAX_VIDEOQ_SIZE ||
- is->subtitleq.size > MAX_SUBTITLEQ_SIZE ||
- url_feof(ic->pb)) {
+ is->subtitleq.size > MAX_SUBTITLEQ_SIZE) {
/* wait 10 ms */
SDL_Delay(10);
continue;
}
+ if(url_feof(ic->pb)) {
+ av_init_packet(pkt);
+ pkt->data=
+ pkt->size=0;
+ pkt->stream_index= is->video_stream;
+ packet_queue_put(&is->videoq, pkt);
+ continue;
+ }
ret = av_read_frame(ic, pkt);
if (ret < 0) {
if (url_ferror(ic->pb) == 0) {