Commit 341edf5e authored by Laurent Aimar's avatar Laurent Aimar

* all: added support for edts/elst entries (needed to play some files).

 Please test, it may have heavily broken playback of some files !!!
parent c8ac42bf
......@@ -2,7 +2,7 @@
* libmp4.c : LibMP4 library for mp4 module for vlc
*****************************************************************************
* Copyright (C) 2001 VideoLAN
* $Id: libmp4.c,v 1.43 2004/01/09 04:37:43 jlj Exp $
* $Id: libmp4.c,v 1.44 2004/01/18 22:00:00 fenrir Exp $
*
* Author: Laurent Aimar <fenrir@via.ecp.fr>
*
......@@ -1559,7 +1559,7 @@ static int MP4_ReadBox_elst( MP4_Stream_t *p_stream, MP4_Box_t *p_box )
p_box->data.p_elst->i_segment_duration =
calloc( sizeof( uint64_t ), p_box->data.p_elst->i_entry_count );
p_box->data.p_elst->i_media_time =
calloc( sizeof( uint64_t ), p_box->data.p_elst->i_entry_count );
calloc( sizeof( int64_t ), p_box->data.p_elst->i_entry_count );
p_box->data.p_elst->i_media_rate_integer =
calloc( sizeof( uint16_t ), p_box->data.p_elst->i_entry_count );
p_box->data.p_elst->i_media_rate_fraction=
......@@ -1581,6 +1581,7 @@ static int MP4_ReadBox_elst( MP4_Stream_t *p_stream, MP4_Box_t *p_box )
MP4_GET4BYTES( p_box->data.p_elst->i_segment_duration[i] );
MP4_GET4BYTES( p_box->data.p_elst->i_media_time[i] );
p_box->data.p_elst->i_media_time[i] = (int32_t)p_box->data.p_elst->i_media_time[i];
}
MP4_GET2BYTES( p_box->data.p_elst->i_media_rate_integer[i] );
......
This diff is collapsed.
......@@ -2,7 +2,7 @@
* mp4.h : MP4 file input module for vlc
*****************************************************************************
* Copyright (C) 2001 VideoLAN
* $Id: mp4.h,v 1.12 2004/01/18 18:31:50 fenrir Exp $
* $Id: mp4.h,v 1.13 2004/01/18 22:00:00 fenrir Exp $
* Authors: Laurent Aimar <fenrir@via.ecp.fr>
*
* This program is free software; you can redistribute it and/or modify
......@@ -64,7 +64,12 @@ typedef struct
int i_height;
/* more internal data */
uint64_t i_timescale; /* time scale for this track only */
uint64_t i_timescale; /* time scale for this track only */
/* elst */
int i_elst; /* current elst */
int64_t i_elst_time; /* current elst start time (in movie time scale)*/
MP4_Box_t *p_elst; /* elst (could be NULL) */
/* give the next sample to read, i_chunk is to find quickly where
the sample is located */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment