This is an automated email from the git hooks/post-receive script.

Git pushed a commit to branch release/8.0
in repository ffmpeg.

commit 6757824801637433207f9e810a5d0eb6700251f7
Author:     Niklas Haas <[email protected]>
AuthorDate: Sun Jun 28 14:27:28 2026 +0200
Commit:     Marvin Scholz <[email protected]>
CommitDate: Mon Jun 29 13:24:01 2026 +0200

    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 <[email protected]>
    (cherry picked from commit 5c877416a56f491b0dfc3dfd1fc920aebe43ed18)
    Signed-off-by: Marvin Scholz <[email protected]>
---
 fftools/ffmpeg_demux.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/fftools/ffmpeg_demux.c b/fftools/ffmpeg_demux.c
index 4b774d6a77..f33705ce07 100644
--- a/fftools/ffmpeg_demux.c
+++ b/fftools/ffmpeg_demux.c
@@ -511,10 +511,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;

_______________________________________________
ffmpeg-cvslog mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to