[FFmpeg-cvslog] r16484 - trunk/ffplay.c

michael subversion
Wed Jan 7 21:45:39 CET 2009


Author: michael
Date: Wed Jan  7 21:45:39 2009
New Revision: 16484

Log:
Inject NULL packets into the video packet que at EOF to force all delayed
frames to be output.

Modified:
   trunk/ffplay.c

Modified: trunk/ffplay.c
==============================================================================
--- trunk/ffplay.c	Wed Jan  7 21:44:23 2009	(r16483)
+++ trunk/ffplay.c	Wed Jan  7 21:45:39 2009	(r16484)
@@ -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) {




More information about the ffmpeg-cvslog mailing list