]> rtime.felk.cvut.cz Git - frescor/ffmpeg.git/commitdiff
Only insert null packets into the video que if there is a video stream.
authormichael <michael@9553f0bf-9b14-0410-a0b8-cfaf0461ba5b>
Sun, 19 Apr 2009 21:44:03 +0000 (21:44 +0000)
committermichael <michael@9553f0bf-9b14-0410-a0b8-cfaf0461ba5b>
Sun, 19 Apr 2009 21:44:03 +0000 (21:44 +0000)
Fixes memleak and should fix issue791.

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

ffplay.c

index 3e52af79dffa55afc83a32542fe6f3dc6975e401..e9f9f6412b0f3aee7339e207cf552f6ae71258a4 100644 (file)
--- a/ffplay.c
+++ b/ffplay.c
@@ -2074,11 +2074,13 @@ static int decode_thread(void *arg)
             continue;
         }
         if(url_feof(ic->pb) || eof) {
+            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;
         }