]> git.sesse.net Git - vlc/commitdiff
* mp4: fix a segfault and play .3gp with h263 video track.
authorLaurent Aimar <fenrir@videolan.org>
Tue, 6 May 2003 16:05:10 +0000 (16:05 +0000)
committerLaurent Aimar <fenrir@videolan.org>
Tue, 6 May 2003 16:05:10 +0000 (16:05 +0000)
modules/demux/mp4/libmp4.c
modules/demux/mp4/libmp4.h
modules/demux/mp4/mp4.c

index 548bf938f6c8822ab3d1e1b16fe0598d63d30095..3644d8ea531024ab848961935ebcebfaac6088d3 100644 (file)
@@ -2,7 +2,7 @@
  * libmp4.c : LibMP4 library for mp4 module for vlc
  *****************************************************************************
  * Copyright (C) 2001 VideoLAN
- * $Id: libmp4.c,v 1.23 2003/04/25 21:47:25 fenrir Exp $
+ * $Id: libmp4.c,v 1.24 2003/05/06 16:05:10 fenrir Exp $
  * Authors: Laurent Aimar <fenrir@via.ecp.fr>
  *
  * This program is free software; you can redistribute it and/or modify
@@ -2121,6 +2121,7 @@ static struct
     { FOURCC_ZyGo,  MP4_ReadBox_sample_vide,    MP4_FreeBox_Common },
     { FOURCC_DIVX,  MP4_ReadBox_sample_vide,    MP4_FreeBox_Common },
     { FOURCC_h263,  MP4_ReadBox_sample_vide,    MP4_FreeBox_Common },
+    { FOURCC_s263,  MP4_ReadBox_sample_vide,    MP4_FreeBox_Common },
     { FOURCC_cvid,  MP4_ReadBox_sample_vide,    MP4_FreeBox_Common },
     { FOURCC_3IV1,  MP4_ReadBox_sample_vide,    MP4_FreeBox_Common },
     { FOURCC_3iv1,  MP4_ReadBox_sample_vide,    MP4_FreeBox_Common },
index 0549537c205eb03daec40c18f19e371ab90cc6d5..4bc68cb83b0267f478f1dd827b14314d177f70fd 100644 (file)
@@ -2,7 +2,7 @@
  * libmp4.h : LibMP4 library for mp4 module for vlc
  *****************************************************************************
  * Copyright (C) 2001 VideoLAN
- * $Id: libmp4.h,v 1.10 2003/04/22 08:51:28 fenrir Exp $
+ * $Id: libmp4.h,v 1.11 2003/05/06 16:05:10 fenrir Exp $
  * Authors: Laurent Aimar <fenrir@via.ecp.fr>
  * 
  * This program is free software; you can redistribute it and/or modify
 #define FOURCC_3VID VLC_FOURCC( '3', 'V', 'I', 'D' )
 #define FOURCC_3vid VLC_FOURCC( '3', 'v', 'i', 'd' )
 #define FOURCC_h263 VLC_FOURCC( 'h', '2', '6', '3' )
+#define FOURCC_s263 VLC_FOURCC( 's', '2', '6', '3' )
 #define FOURCC_DIVX VLC_FOURCC( 'D', 'I', 'V', 'X' )
 #define FOURCC_cvid VLC_FOURCC( 'c', 'v', 'i', 'd' )
 #define FOURCC_mjpa VLC_FOURCC( 'm', 'j', 'p', 'a' )
index f4c1323e83b2ae5cd7b2c3e6f833140640c686fb..1a8fbaba01871b6f7431001094baa3fb504cfebd 100644 (file)
@@ -2,7 +2,7 @@
  * mp4.c : MP4 file input module for vlc
  *****************************************************************************
  * Copyright (C) 2001 VideoLAN
- * $Id: mp4.c,v 1.28 2003/05/05 22:23:36 gbazin Exp $
+ * $Id: mp4.c,v 1.29 2003/05/06 16:05:10 fenrir Exp $
  * Authors: Laurent Aimar <fenrir@via.ecp.fr>
  *
  * This program is free software; you can redistribute it and/or modify
@@ -965,6 +965,9 @@ static int  TrackCreateES   ( input_thread_t   *p_input,
         case( VLC_FOURCC( 'r', 'a', 'w', ' ' ) ):
             p_es->i_fourcc = VLC_FOURCC( 'a', 'r', 'a', 'w' );
             break;
+        case( VLC_FOURCC( 's', '2', '6', '3' ) ):
+            p_es->i_fourcc = VLC_FOURCC( 'h', '2', '6', '3' );
+            break;
         default:
             p_es->i_fourcc = p_sample->i_type;
             break;
@@ -1491,7 +1494,7 @@ static void MP4_TrackCreate( input_thread_t *p_input,
         MP4_Box_t *p_sample;
 
         p_sample = MP4_BoxGet(  p_track->p_stsd, "[0]" );
-        if( p_sample )
+        if( p_sample && p_sample->data.p_sample_soun)
         {
             MP4_Box_data_sample_soun_t *p_soun = p_sample->data.p_sample_soun;
             if( p_soun->i_qt_version == 0 && p_track->i_timescale != p_soun->i_sampleratehi )