[FFmpeg-trac] #6490(avformat:new): youtube live stream stopt play
FFmpeg
trac at avcodec.org
Sun Jun 25 23:28:08 EEST 2017
#6490: youtube live stream stopt play
----------------------------------+--------------------------------------
Reporter: mobifon | Type: defect
Status: new | Priority: normal
Component: avformat | Version: git-master
Keywords: | Blocked By:
Blocking: | Reproduced by developer: 0
Analyzed by developer: 0 |
----------------------------------+--------------------------------------
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.
--
Ticket URL: <https://trac.ffmpeg.org/ticket/6490>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker
More information about the FFmpeg-trac
mailing list