Commit 6e1f8725 authored by Roman Shaposhnik's avatar Roman Shaposhnik

* 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
parent 664f5836
...@@ -1439,7 +1439,11 @@ static int decode_thread(void *arg) ...@@ -1439,7 +1439,11 @@ static int decode_thread(void *arg)
} }
ret = av_read_frame(ic, pkt); ret = av_read_frame(ic, pkt);
if (ret < 0) { 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) { if (pkt->stream_index == is->audio_stream) {
packet_queue_put(&is->audioq, pkt); packet_queue_put(&is->audioq, pkt);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment