[vlc-commits] demux/mp4: do not demux f4v files for now

Frédéric Yhuel git at videolan.org
Fri May 25 01:06:16 CEST 2012


vlc | branch: master | Frédéric Yhuel <fyhuel at viotech.net> | Thu May 24 11:16:06 2012 +0200| [f47133cbac88a1ef04e526df27eaa4e86a6f2d5a] | committer: Jean-Baptiste Kempf

demux/mp4: do not demux f4v files for now

This is a temporary workaround until someone add support for f4v.

Work-around #4915

Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=f47133cbac88a1ef04e526df27eaa4e86a6f2d5a
---

 modules/demux/mp4/mp4.c |    8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/modules/demux/mp4/mp4.c b/modules/demux/mp4/mp4.c
index 3f7c7cb..bef1102 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,11 @@ 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;
+            break;
          default:
             return VLC_EGENERIC;
     }



More information about the vlc-commits mailing list