mirror of https://github.com/mpv-player/mpv
demux_lavf: export correct seekability state for HLS live streams
Requires newest FFmpeg git, which has a change that makes the HLS demuxer set an AVFMTCTX_UNSEEKABLE flag if seeking is not available, which is the case for HLS live streams. This should make the player frontend behave pretty well, instead of crapping up irrecoverably.
This commit is contained in:
parent
3766024dcd
commit
ef324e1316
|
@ -920,6 +920,11 @@ static int demux_open_lavf(demuxer_t *demuxer, enum demux_check check)
|
|||
|
||||
demuxer->fully_read = priv->format_hack.fully_read;
|
||||
|
||||
#ifdef AVFMTCTX_UNSEEKABLE
|
||||
if (avfc->ctx_flags & AVFMTCTX_UNSEEKABLE)
|
||||
demuxer->seekable = false;
|
||||
#endif
|
||||
|
||||
if (priv->avfc->duration > 0) {
|
||||
demuxer->duration = (double)priv->avfc->duration / AV_TIME_BASE;
|
||||
} else {
|
||||
|
|
Loading…
Reference in New Issue