Commit 5b998cb9 authored by Francois Cartegnie's avatar Francois Cartegnie

demux: mp4: fix retrieving trun durations

LeafDemuxer fixes (the experimental data-sequence driven
fragmented mp4 demux).

Some muxers are interleaving using single trun/fragments,
Moov()->Moov(A)->Moof(B)
instead of interlacing truns withing fragments.
Moov()->Moof(A,B)->Moof(A,B)
Example: BigBuckBunny ismv file

Another problem is that data isn't interleaved at all
at end of tracks, and there's a long trailing gap of
audio fragments only.
Moov()->Moov(A)->Moof(B)->Moof(B)->Moof(B)->Moof(B)
parent e59b5819
This diff is collapsed.
...@@ -126,7 +126,7 @@ typedef struct ...@@ -126,7 +126,7 @@ typedef struct
void *p_drms; void *p_drms;
MP4_Box_t *p_skcr; MP4_Box_t *p_skcr;
mtime_t i_time; mtime_t i_time; // track scaled
struct struct
{ {
...@@ -149,7 +149,12 @@ struct mp4_fragment_t ...@@ -149,7 +149,12 @@ struct mp4_fragment_t
{ {
uint64_t i_chunk_range_min_offset; uint64_t i_chunk_range_min_offset;
uint64_t i_chunk_range_max_offset; uint64_t i_chunk_range_max_offset;
uint64_t i_duration; struct
{
unsigned int i_track_ID;
uint64_t i_duration; // movie scaled
} *p_durations;
unsigned int i_durations;
MP4_Box_t *p_moox; MP4_Box_t *p_moox;
mp4_fragment_t *p_next; mp4_fragment_t *p_next;
}; };
......
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