]> rtime.felk.cvut.cz Git - frescor/ffmpeg.git/commitdiff
Inject NULL packets into the video packet que at EOF to force all delayed
authormichael <michael@9553f0bf-9b14-0410-a0b8-cfaf0461ba5b>
Wed, 7 Jan 2009 20:45:39 +0000 (20:45 +0000)
committermichael <michael@9553f0bf-9b14-0410-a0b8-cfaf0461ba5b>
Wed, 7 Jan 2009 20:45:39 +0000 (20:45 +0000)
frames to be output.

git-svn-id: file:///var/local/repositories/ffmpeg/trunk@16484 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b

ffplay.c

index 4f8a803b9c9a80870b30872fc00a076dedafd719..12190dacfa79d441f0324ab7e30ff27a5cb09dad 100644 (file)
--- 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) {