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

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


vlc/vlc-2.0 | branch: master | Frédéric Yhuel <fyhuel at viotech.net> | Thu May 24 11:16:06 2012 +0200| [13752933868ecb088749bfd799118ed24301d25e] | 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>
(cherry picked from commit f47133cbac88a1ef04e526df27eaa4e86a6f2d5a)

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

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

 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 bfbea39..488b371d 100644
--- a/modules/demux/mp4/mp4.c
+++ b/modules/demux/mp4/mp4.c
@@ -279,11 +279,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:
@@ -294,6 +293,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