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

Git pushed a commit to branch master
in repository ffmpeg.

commit 6a351a3113e407885a6ca6787b55fbf1b78cbee5
Author:     Steven Liu <[email protected]>
AuthorDate: Mon Jul 6 08:04:20 2026 +0800
Commit:     stevenliu <[email protected]>
CommitDate: Tue Jul 7 18:31:35 2026 +0000

    avformat/dashdec: check fragment_timescale before division in 
refresh_manifest
    
    fix issue: issues/23057 POC4
    
    In refresh_manifest(), when timelines are present, fragment_timescale is
    used as the denominator to compute currentTime. If fragment_timescale is
    zero (e.g., timescale attribute missing from a crafted manifest with
    SegmentTimeline), this results in a division by zero.
    
    Add fragment_timescale > 0 guard to both the video and audio timeline
    processing paths to prevent the crash.
    
    Signed-off-by: Steven Liu <[email protected]>
---
 libavformat/dashdec.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/libavformat/dashdec.c b/libavformat/dashdec.c
index 45897eba33..ba49677a09 100644
--- a/libavformat/dashdec.c
+++ b/libavformat/dashdec.c
@@ -1595,7 +1595,7 @@ static int refresh_manifest(AVFormatContext *s)
     for (i = 0; i < n_videos; i++) {
         struct representation *cur_video = videos[i];
         struct representation *ccur_video = c->videos[i];
-        if (cur_video->timelines) {
+        if (cur_video->timelines && cur_video->fragment_timescale > 0) {
             // calc current time
             int64_t currentTime = 
get_segment_start_time_based_on_timeline(cur_video, cur_video->cur_seq_no) / 
cur_video->fragment_timescale;
             // update segments
@@ -1611,7 +1611,7 @@ static int refresh_manifest(AVFormatContext *s)
     for (i = 0; i < n_audios; i++) {
         struct representation *cur_audio = audios[i];
         struct representation *ccur_audio = c->audios[i];
-        if (cur_audio->timelines) {
+        if (cur_audio->timelines && cur_audio->fragment_timescale > 0) {
             // calc current time
             int64_t currentTime = 
get_segment_start_time_based_on_timeline(cur_audio, cur_audio->cur_seq_no) / 
cur_audio->fragment_timescale;
             // update segments

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

Reply via email to