Opened 8 years ago
Last modified 8 years ago
#6486 new defect
ffplay broken with hls format after his commit ee4b14322155b5808eeceb463f5edcd751eb3a98
Reported by: | mobifon | Owned by: | |
---|---|---|---|
Priority: | normal | Component: | ffplay |
Version: | git-master | Keywords: | |
Cc: | Blocked By: | ||
Blocking: | Reproduced by developer: | no | |
Analyzed by developer: | no |
Description
Summary of the bug:
I have since this ee4b14322155b5808eeceb463f5edcd751eb3a98 commit, intermittent interruptions at hls format on youtube.
How to reproduce:
ffplay $(youtube-dl -g https://www.youtube.com/watch?v=Ga3maNZ0x0w) ffmpeg version libavutil 55. 66.100 / 55. 66.100 libavcodec 57. 99.100 / 57. 99.100 libavformat 57. 73.100 / 57. 73.100 libavdevice 57. 7.100 / 57. 7.100 libavfilter 6. 94.100 / 6. 94.100 libswscale 4. 7.101 / 4. 7.101 libswresample 2. 8.100 / 2. 8.100 libpostproc 54. 6.100 / 54. 6.100 built on ... linux
With this diff workarond work ok, but this is not solution.
diff --git a/ffplay.c b/ffplay.c
index c0b326c8cc..437b6a86a0 100644
--- a/ffplay.c
+++ b/ffplay.c
@@ -2932,9 +2932,9 @@ static int read_thread(void *arg)
/* if the queue are full, no need to read more */
if (infinite_buffer<1 &&
(is->audioq.size + is->videoq.size + is->subtitleq.size > MAX_QUEUE_SIZE
(stream_has_enough_packets(is->audio_st, is->audio_stream, &is->audioq) && |
(stream_has_enough_packets(is->audio_st, is->audio_stream, &is->audioq) && |
stream_has_enough_packets(is->video_st, is->video_stream, &is->videoq) &&
- stream_has_enough_packets(is->subtitle_st, is->subtitle_stream, &is->subtitleq)))) {
+ stream_has_enough_packets(is->subtitle_st, is->subtitle_stream, &is->subtitleq))*/)) {
/* wait 10 ms */
SDL_LockMutex(wait_mutex);
SDL_CondWaitTimeout(is->continue_read_thread, wait_mutex, 10);
You can probably fix this by increasing the amount of buffered data from 1 sec to more in stream_has_enough_packets.