FREENULL( p_box->data.p_trun->p_samples );
}
+static int MP4_ReadBox_tfdt( stream_t *p_stream, MP4_Box_t *p_box )
+{
+ MP4_READBOX_ENTER( MP4_Box_data_tfdt_t );
+ if( i_read < 8 )
+ MP4_READBOX_EXIT( 0 );
+
+ MP4_GETVERSIONFLAGS( p_box->data.p_tfdt );
+
+ if( p_box->data.p_tfdt->i_version == 0 )
+ MP4_GET4BYTES( p_box->data.p_tfdt->i_base_media_decode_time );
+ else if( p_box->data.p_tfdt->i_version == 1 )
+ MP4_GET8BYTES( p_box->data.p_tfdt->i_base_media_decode_time );
+ else
+ MP4_READBOX_EXIT( 0 );
+
+ MP4_READBOX_EXIT( 1 );
+}
static int MP4_ReadBox_tkhd( stream_t *p_stream, MP4_Box_t *p_box )
{
{ ATOM_sidx, MP4_ReadBox_sidx, MP4_FreeBox_sidx, 0 },
{ ATOM_tfhd, MP4_ReadBox_tfhd, MP4_FreeBox_Common, ATOM_traf },
{ ATOM_trun, MP4_ReadBox_trun, MP4_FreeBox_trun, ATOM_traf },
+ { ATOM_tfdt, MP4_ReadBox_tfdt, MP4_FreeBox_Common, ATOM_traf },
{ ATOM_trex, MP4_ReadBox_trex, MP4_FreeBox_Common, ATOM_mvex },
{ ATOM_mehd, MP4_ReadBox_mehd, MP4_FreeBox_Common, ATOM_mvex },
{ ATOM_sdtp, MP4_ReadBox_sdtp, MP4_FreeBox_sdtp, 0 },
#define ATOM_traf VLC_FOURCC( 't', 'r', 'a', 'f' )
#define ATOM_sidx VLC_FOURCC( 's', 'i', 'd', 'x' )
#define ATOM_tfhd VLC_FOURCC( 't', 'f', 'h', 'd' )
+#define ATOM_tfdt VLC_FOURCC( 't', 'f', 'd', 't' )
#define ATOM_trun VLC_FOURCC( 't', 'r', 'u', 'n' )
#define ATOM_cprt VLC_FOURCC( 'c', 'p', 'r', 't' )
#define ATOM_iods VLC_FOURCC( 'i', 'o', 'd', 's' )
} MP4_Box_data_trun_t;
+typedef struct MP4_Box_data_tfdt_s
+{
+ uint8_t i_version;
+ uint32_t i_flags;
+ int64_t i_base_media_decode_time;
+
+} MP4_Box_data_tfdt_t;
+
typedef struct
{
uint32_t i_date;
MP4_Box_data_sidx_t *p_sidx;
MP4_Box_data_tfhd_t *p_tfhd;
MP4_Box_data_trun_t *p_trun;
+ MP4_Box_data_tfdt_t *p_tfdt;
MP4_Box_data_tkhd_t *p_tkhd;
MP4_Box_data_mdhd_t *p_mdhd;
MP4_Box_data_hdlr_t *p_hdlr;