Commit 84cb5c55 authored by Laurent Aimar's avatar Laurent Aimar

* mp4: fix a segfault and play .3gp with h263 video track.

parent 9ff0782a
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* libmp4.c : LibMP4 library for mp4 module for vlc * libmp4.c : LibMP4 library for mp4 module for vlc
***************************************************************************** *****************************************************************************
* Copyright (C) 2001 VideoLAN * 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> * Authors: Laurent Aimar <fenrir@via.ecp.fr>
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
...@@ -2121,6 +2121,7 @@ static struct ...@@ -2121,6 +2121,7 @@ static struct
{ FOURCC_ZyGo, MP4_ReadBox_sample_vide, MP4_FreeBox_Common }, { FOURCC_ZyGo, MP4_ReadBox_sample_vide, MP4_FreeBox_Common },
{ FOURCC_DIVX, 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_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_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 },
{ FOURCC_3iv1, MP4_ReadBox_sample_vide, MP4_FreeBox_Common }, { FOURCC_3iv1, MP4_ReadBox_sample_vide, MP4_FreeBox_Common },
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* libmp4.h : LibMP4 library for mp4 module for vlc * libmp4.h : LibMP4 library for mp4 module for vlc
***************************************************************************** *****************************************************************************
* Copyright (C) 2001 VideoLAN * 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> * Authors: Laurent Aimar <fenrir@via.ecp.fr>
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
...@@ -122,6 +122,7 @@ ...@@ -122,6 +122,7 @@
#define FOURCC_3VID VLC_FOURCC( '3', 'V', 'I', 'D' ) #define FOURCC_3VID VLC_FOURCC( '3', 'V', 'I', 'D' )
#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_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_DIVX VLC_FOURCC( 'D', 'I', 'V', 'X' )
#define FOURCC_cvid VLC_FOURCC( 'c', 'v', 'i', 'd' ) #define FOURCC_cvid VLC_FOURCC( 'c', 'v', 'i', 'd' )
#define FOURCC_mjpa VLC_FOURCC( 'm', 'j', 'p', 'a' ) #define FOURCC_mjpa VLC_FOURCC( 'm', 'j', 'p', 'a' )
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* mp4.c : MP4 file input module for vlc * mp4.c : MP4 file input module for vlc
***************************************************************************** *****************************************************************************
* Copyright (C) 2001 VideoLAN * 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> * Authors: Laurent Aimar <fenrir@via.ecp.fr>
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
...@@ -965,6 +965,9 @@ static int TrackCreateES ( input_thread_t *p_input, ...@@ -965,6 +965,9 @@ static int TrackCreateES ( input_thread_t *p_input,
case( VLC_FOURCC( 'r', 'a', 'w', ' ' ) ): case( VLC_FOURCC( 'r', 'a', 'w', ' ' ) ):
p_es->i_fourcc = VLC_FOURCC( 'a', 'r', 'a', 'w' ); p_es->i_fourcc = VLC_FOURCC( 'a', 'r', 'a', 'w' );
break; break;
case( VLC_FOURCC( 's', '2', '6', '3' ) ):
p_es->i_fourcc = VLC_FOURCC( 'h', '2', '6', '3' );
break;
default: default:
p_es->i_fourcc = p_sample->i_type; p_es->i_fourcc = p_sample->i_type;
break; break;
...@@ -1491,7 +1494,7 @@ static void MP4_TrackCreate( input_thread_t *p_input, ...@@ -1491,7 +1494,7 @@ static void MP4_TrackCreate( input_thread_t *p_input,
MP4_Box_t *p_sample; MP4_Box_t *p_sample;
p_sample = MP4_BoxGet( p_track->p_stsd, "[0]" ); 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; 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 ) if( p_soun->i_qt_version == 0 && p_track->i_timescale != p_soun->i_sampleratehi )
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment