[vlc-devel] [PATCH] demux/mp4: let avformat demux f4v files for now
Frédéric Yhuel
fyhuel at viotech.net
Thu May 24 11:16:06 CEST 2012
This is a temporary workaround until someone add support for f4v.
---
modules/demux/mp4/mp4.c | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/modules/demux/mp4/mp4.c b/modules/demux/mp4/mp4.c
index 3f7c7cb..3b76a4d 100644
--- a/modules/demux/mp4/mp4.c
+++ b/modules/demux/mp4/mp4.c
@@ -199,11 +199,10 @@ static int Open( vlc_object_t * p_this )
bool b_enabled_es;
/* A little test to see if it could be a mp4 */
- if( stream_Peek( p_demux->s, &p_peek, 8 ) < 8 ) return VLC_EGENERIC;
+ if( stream_Peek( p_demux->s, &p_peek, 11 ) < 11 ) return VLC_EGENERIC;
switch( VLC_FOURCC( p_peek[4], p_peek[5], p_peek[6], p_peek[7] ) )
{
- case ATOM_ftyp:
case ATOM_moov:
case ATOM_foov:
case ATOM_moof:
@@ -214,6 +213,12 @@ static int Open( vlc_object_t * p_this )
case ATOM_wide:
case VLC_FOURCC( 'p', 'n', 'o', 't' ):
break;
+ case ATOM_ftyp:
+ /* We don't yet support f4v, but avformat does. */
+ if( p_peek[8] == 'f' && p_peek[9] == '4' && p_peek[10] == 'v' )
+ return VLC_EGENERIC;
+ else
+ break;
default:
return VLC_EGENERIC;
}
--
1.7.9.5
More information about the vlc-devel
mailing list