Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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: e6afc53 ("demux_lavf: get total duration from track durations")
- Loading branch information