[vlc-devel] commit: Fixed playing of some .mov with raw audio. (Laurent Aimar )
git version control
git at videolan.org
Thu Jul 3 22:49:06 CEST 2008
vlc | branch: master | Laurent Aimar <fenrir at videolan.org> | Thu Jul 3 20:48:05 2008 +0000| [58766eae93336caaf0113e76900900a7a274bd05]
Fixed playing of some .mov with raw audio.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=58766eae93336caaf0113e76900900a7a274bd05
---
modules/demux/mp4/mp4.c | 12 +++++++++++-
1 files changed, 11 insertions(+), 1 deletions(-)
diff --git a/modules/demux/mp4/mp4.c b/modules/demux/mp4/mp4.c
index e7b4750..a55170b 100644
--- a/modules/demux/mp4/mp4.c
+++ b/modules/demux/mp4/mp4.c
@@ -1427,6 +1427,8 @@ static int TrackCreateES( demux_t *p_demux, mp4_track_t *p_track,
case VLC_FOURCC( 'u', 'l', 'a', 'w' ):
p_soun->i_samplesize = 8;
break;
+ case VLC_FOURCC( 'N', 'O', 'N', 'E' ):
+ case VLC_FOURCC( 'r', 'a', 'w', ' ' ):
case VLC_FOURCC( 't', 'w', 'o', 's' ):
case VLC_FOURCC( 's', 'o', 'w', 't' ):
/* What would be the fun if you could trust the .mov */
@@ -1452,7 +1454,14 @@ static int TrackCreateES( demux_t *p_demux, mp4_track_t *p_track,
break;
case( VLC_FOURCC( 'r', 'a', 'w', ' ' ) ):
- p_track->fmt.i_codec = VLC_FOURCC( 'a', 'r', 'a', 'w' );
+ case( VLC_FOURCC( 'N', 'O', 'N', 'E' ) ):
+ {
+ MP4_Box_data_sample_soun_t *p_soun = p_sample->data.p_sample_soun;
+
+ if(p_soun && (p_soun->i_samplesize+7)/8 == 1 )
+ p_track->fmt.i_codec = VLC_FOURCC( 'u', '8', ' ', ' ' );
+ else
+ p_track->fmt.i_codec = VLC_FOURCC( 't', 'w', 'o', 's' );
/* Buggy files workaround */
if( p_sample->data.p_sample_soun && (p_track->i_timescale !=
@@ -1471,6 +1480,7 @@ static int TrackCreateES( demux_t *p_demux, mp4_track_t *p_track,
p_soun->i_sampleratehi = p_track->i_timescale;
}
break;
+ }
case( VLC_FOURCC( 's', '2', '6', '3' ) ):
p_track->fmt.i_codec = VLC_FOURCC( 'h', '2', '6', '3' );
More information about the vlc-devel
mailing list