]> git.sesse.net Git - vlc/commitdiff
mux: mp4frag: add tfdt atom
authorFrancois Cartegnie <fcvlcdev@free.fr>
Fri, 26 Sep 2014 20:26:22 +0000 (22:26 +0200)
committerFrancois Cartegnie <fcvlcdev@free.fr>
Fri, 26 Sep 2014 20:26:49 +0000 (22:26 +0200)
modules/mux/mp4.c

index 31624ec2388e4a9043d24bcb342a0d61fc91a26d..959428523b7651d45d5acd6f754879e68eeaad4f 100644 (file)
@@ -2485,6 +2485,11 @@ static bo_t *GetMoofBox(sout_mux_t *p_mux, size_t *pi_mdat_total_size,
 
         box_gather(traf, tfhd);
 
+        /* *** add /moof/traf/tfdt *** */
+        bo_t *tfdt = box_full_new("tfdt", 1, 0);
+        bo_add_64be(tfdt, p_stream->i_written_duration * p_stream->i_timescale / CLOCK_FREQ );
+        box_gather(traf, tfdt);
+
         /* *** add /moof/traf/trun *** */
         if (p_stream->read.p_first)
         {