mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2026-08-09 01:21:06 +00:00
fftools/ffmpeg_demux: skip finished/unstarted streams in readrate_sleep()
This shouldn't affect the actual behavior, as the initialization of ds->dts (implicitly zero'd) and the previous calculation of stream_ts_offset guarantees that the `if (pts <= stream_ts_offset) continue;` branch fires. Mainly a minor clarification of the code for the upcoming refactor. Signed-off-by: Niklas Haas <git@haasn.dev>
This commit is contained in:
@@ -521,10 +521,10 @@ static void readrate_sleep(Demuxer *d)
|
||||
InputStream *ist = f->streams[i];
|
||||
DemuxStream *ds = ds_from_ist(ist);
|
||||
int64_t stream_ts_offset, pts, now, wc_elapsed, elapsed, lag, max_pts, limit_pts;
|
||||
if (ds->discard || ds->finished || ds->first_dts == AV_NOPTS_VALUE)
|
||||
continue;
|
||||
|
||||
if (ds->discard) continue;
|
||||
|
||||
stream_ts_offset = FFMAX(ds->first_dts != AV_NOPTS_VALUE ? ds->first_dts : 0, file_start);
|
||||
stream_ts_offset = FFMAX(ds->first_dts, file_start);
|
||||
pts = av_rescale(ds->dts, 1000000, AV_TIME_BASE);
|
||||
now = av_gettime_relative();
|
||||
wc_elapsed = now - d->wallclock_start;
|
||||
|
||||
Reference in New Issue
Block a user