From 6e1f8725ef499daf6d41ccef9b66ce3a1c4bdf2a Mon Sep 17 00:00:00 2001 From: Roman Shaposhnik Date: Wed, 13 Oct 2004 00:10:43 +0000 Subject: * fixing a problem with ffplay being stuck (and not responding to anything but 'q') when it reaches the end of stream. Originally committed as revision 3591 to svn://svn.ffmpeg.org/ffmpeg/trunk --- ffplay.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'ffplay.c') diff --git a/ffplay.c b/ffplay.c index 018cd40..c8d9199 100644 --- a/ffplay.c +++ b/ffplay.c @@ -1439,7 +1439,11 @@ static int decode_thread(void *arg) } ret = av_read_frame(ic, pkt); if (ret < 0) { - break; + if (url_feof(&ic->pb) && url_ferror(&ic->pb) == 0) { + SDL_Delay(100); /* wait for user event */ + continue; + } else + break; } if (pkt->stream_index == is->audio_stream) { packet_queue_put(&is->audioq, pkt); -- cgit v1.1