diff options
author | llyyr <llyyr.public@gmail.com> | 2023-09-21 23:03:16 +0530 |
---|---|---|
committer | sfan5 <sfan5@live.de> | 2023-09-22 12:14:16 +0200 |
commit | 84d6044d2bd4b0a2b6bc8d6f3deaf37747619284 (patch) | |
tree | a3a93e6300359f398e7bff934af8340c21e5b165 /options/options.h | |
parent | f09ebc871c9278e1ff1f21058df1cd8d7de19f9e (diff) | |
download | mpv-84d6044d2bd4b0a2b6bc8d6f3deaf37747619284.tar.bz2 mpv-84d6044d2bd4b0a2b6bc8d6f3deaf37747619284.tar.xz |
demux_lavf: set duration to -1 if unknown
`demux->duration` is set to -1 on initialization, and some checks rely
on it being -1 when unknown. Before this commit, we set
`demux->duration` to 0 when unknown. This is incorrect and breaks rtsp
logic for disabling seeking outside of cached regions.
To fix these issues, initialize `total_duration` and `av_duration` at
-1. They're only changed if a real duration is detected, so in cases
where the duration is unknown, demux->duration is set to -1 correctly.
Fixes: e6afc53e7c ("demux_lavf: get total duration from track durations")
Diffstat (limited to 'options/options.h')
0 files changed, 0 insertions, 0 deletions