#6490 closed defect (fixed)
youtube live stream stopt play
Reported by: | mobifon | Owned by: | |
---|---|---|---|
Priority: | important | Component: | avformat |
Version: | git-master | Keywords: | http regression |
Cc: | Blocked By: | ||
Blocking: | Reproduced by developer: | no | |
Analyzed by developer: | no |
Description
Summary of the bug:
youtube live stream play stops in a few seconds.
This bug i have after this merge commit d0fc5de3a643fe7f974ed14e410c2ac2f4147d7e ( 81306fd4bdeb5c17d4db771e4fec684773b5790f )
How to reproduce:
ffplay $(curl https://www.youtube.com/watch?v=Ga3maNZ0x0w | grep -o "hlsvp\(.*\)m3u8" | sed 's#\\##g' | grep -o "http\(.*\)m3u8") ffmpeg version built on ...
I have for me this workaround
diff --git a/libavformat/hls.c b/libavformat/hls.c
index 01731bd36b..064839b15b 100644
--- a/libavformat/hls.c
+++ b/libavformat/hls.c
@@ -891,9 +891,11 @@ static int read_from_url(struct playlist *pls, struct segment *seg,
ret = avio_read(pls->input, buf, buf_size);
if (ret != buf_size)
av_log(NULL, AV_LOG_ERROR, "Could not read complete segment.\n");
- } else
+ } else{
ret = avio_read(pls->input, buf, buf_size);
-
+ if (ret != buf_size)
+ ret = 0;
+ }
if (ret > 0)
pls->cur_seg_offset += ret;
Patches should be submitted to the ffmpeg-devel mailing list and not this bug tracker.
Change History (7)
comment:1 by , 7 years ago
comment:3 by , 7 years ago
Can nobody really fix the live youtube play?
With old ffmpeg before commit d0fc5de3a643fe7f974ed14e410c2ac2f4147d7e work perfect.
comment:4 by , 7 years ago
This 3 patches fix this Bug.
https://patchwork.ffmpeg.org/patch/5414/
https://patchwork.ffmpeg.org/patch/5415/
https://patchwork.ffmpeg.org/patch/5416/
ffplay -http_keepalive 1 <url> work ok.
Thx Aman Gupta.
comment:5 by , 7 years ago
Keywords: | regression added |
---|---|
Priority: | normal → important |
Please mention the ticket in the commit message.
comment:6 by , 5 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
comment:7 by , 5 years ago
Keywords: | http added |
---|
The server sometime give me a 403 response.