[vlc-devel] [PATCH 01/11] MP4 demux: only set fragmented flag if filecontains movie fragment atoms.

Frédéric Yhuel yhuelf at gmail.com
Wed Mar 19 17:53:19 CET 2014


On Wed, Mar 19, 2014 at 3:52 PM, Matthias Keiser
<matthias at tristan-inc.com> wrote:
>
> Am 19.03.2014 um 14:13 schrieb Francois Cartegnie <fcvlcdev at free.fr>:
>
>> Le 06/03/2014 01:12, Matthias Keiser a écrit :
>>
>>> -    if( MP4_BoxCount( p_sys->p_root, "/moov/mvex" ) > 0 )
>>> +    if( MP4_BoxCount( p_sys->p_root, "/moov/mvex" ) > 0 &&
>>> +        MP4_BoxCount( p_sys->p_root, "/moof" ) > 0 )
>>>     {
>>>         p_sys->b_fragmented = true;
>>>     }
>>
>> Breaks fragmented playback/fallback on avcodec
>> http://streams.videolan.org/samples/mov/fragments/au30sec.mp4
>
> For me the file you linked to only plays with the above patch, and doesn't play without it (osx, streamed).

I think the patch should be reverted, because it indeed breaks
playback of local fMP4 files, as François noticed.

But you probably should probably edit mp4.c, line 392, like that:

diff --git a/modules/demux/mp4/mp4.c b/modules/demux/mp4/mp4.c
index 7ac64e2..755cfa1 100644
--- a/modules/demux/mp4/mp4.c
+++ b/modules/demux/mp4/mp4.c
@@ -389,7 +389,7 @@ static int Open( vlc_object_t * p_this )
         stream_Seek( p_demux->s, 0 ); /* rewind, for other demux */
         goto error;
     }
-    else if( !p_sys->b_fragmented && !b_seekable )
+    else if( !b_seekable )
     {
         msg_Warn( p_demux, "MP4 plugin discarded (not fast-seekable)" );
         stream_Seek( p_demux->s, 0 ); /* rewind, for other demux */


(not tested)

Except for Smooth Streaming / DASH, for any distant file, wether
fragmented or not, fallback to libavformat is necessary.

Best regards,
Frédéric



More information about the vlc-devel mailing list