Only insert null packets into the video que if there is a video stream.
Fixes memleak and should fix issue791. Originally committed as revision 18629 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
5aef84623a
commit
9dc4176702
2
ffplay.c
2
ffplay.c
@ -2074,11 +2074,13 @@ static int decode_thread(void *arg)
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if(url_feof(ic->pb) || eof) {
|
if(url_feof(ic->pb) || eof) {
|
||||||
|
if(is->video_stream >= 0){
|
||||||
av_init_packet(pkt);
|
av_init_packet(pkt);
|
||||||
pkt->data=NULL;
|
pkt->data=NULL;
|
||||||
pkt->size=0;
|
pkt->size=0;
|
||||||
pkt->stream_index= is->video_stream;
|
pkt->stream_index= is->video_stream;
|
||||||
packet_queue_put(&is->videoq, pkt);
|
packet_queue_put(&is->videoq, pkt);
|
||||||
|
}
|
||||||
SDL_Delay(10);
|
SDL_Delay(10);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user