[vlc-commits] [Git][videolan/vlc][master] 2 commits: demux: mp4: only return true in GetMoofTrackDuration with a duration

Steve Lhomme (@robUx4) gitlab at videolan.org
Sun May 18 11:00:03 UTC 2025



Steve Lhomme pushed to branch master at VideoLAN / VLC


Commits:
b76b5e73 by Steve Lhomme at 2025-05-18T10:15:46+00:00
demux: mp4: only return true in GetMoofTrackDuration with a duration

If for some reason there is no traf, we returned true even though p_duration was never set.

- - - - -
580c283a by Steve Lhomme at 2025-05-18T10:15:46+00:00
demux: mp4: document the decoder delay is in track timescale

- - - - -


2 changed files:

- modules/demux/mp4/mp4.c
- modules/demux/mp4/mp4.h


Changes:

=====================================
modules/demux/mp4/mp4.c
=====================================
@@ -4773,10 +4773,10 @@ static bool GetMoofTrackDuration( MP4_Box_t *p_moov, MP4_Box_t *p_moof,
         }
 
         *p_duration = i_traf_duration;
-        break;
+        return true;
     }
 
-    return true;
+    return false;
 }
 
 static int ProbeFragments( demux_t *p_demux, bool b_force, bool *pb_fragmented )


=====================================
modules/demux/mp4/mp4.h
=====================================
@@ -139,7 +139,7 @@ typedef struct
     stime_t          i_next_dts;
     int64_t          i_cts_shift;
     vlc_tick_t       i_pts_offset;
-    stime_t          i_decoder_delay;
+    stime_t          i_decoder_delay; /* track timescale */
     /* give the next sample to read, i_chunk is to find quickly where
       the sample is located */
     uint32_t         i_sample;       /* next sample to read */



View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/9ed94cc99a70a55ccf7a622ccb2e38541da4999a...580c283a0d6bbd3c4b4a106a35f31c2f1d994316

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/9ed94cc99a70a55ccf7a622ccb2e38541da4999a...580c283a0d6bbd3c4b4a106a35f31c2f1d994316
You're receiving this email because of your account on code.videolan.org.


VideoLAN code repository instance


More information about the vlc-commits mailing list