]> rtime.felk.cvut.cz Git - frescor/ffmpeg.git/blobdiff - ffplay.c
Revert "Prepare for O_DIRECT"
[frescor/ffmpeg.git] / ffplay.c
index 3e52af79dffa55afc83a32542fe6f3dc6975e401..cc12b4a97dd31e23619b65e4b3df7c36a13faa5c 100644 (file)
--- a/ffplay.c
+++ b/ffplay.c
@@ -2063,6 +2063,7 @@ static int decode_thread(void *arg)
                 }
             }
             is->seek_req = 0;
+            eof= 0;
         }
 
         /* if the queue are full, no need to read more */
@@ -2074,11 +2075,13 @@ static int decode_thread(void *arg)
             continue;
         }
         if(url_feof(ic->pb) || eof) {
-            av_init_packet(pkt);
-            pkt->data=NULL;
-            pkt->size=0;
-            pkt->stream_index= is->video_stream;
-            packet_queue_put(&is->videoq, pkt);
+            if(is->video_stream >= 0){
+                av_init_packet(pkt);
+                pkt->data=NULL;
+                pkt->size=0;
+                pkt->stream_index= is->video_stream;
+                packet_queue_put(&is->videoq, pkt);
+            }
             SDL_Delay(10);
             continue;
         }