[vlc-devel] commit: Fixed playing of some twos/sowt samples (close #1621) ( 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 18:34:16 2008 +0000| [cdb14e56c12730d6a193f07dcb8e0398215e1fad]
Fixed playing of some twos/sowt samples (close #1621)
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=cdb14e56c12730d6a193f07dcb8e0398215e1fad
---
modules/demux/mp4/mp4.c | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/modules/demux/mp4/mp4.c b/modules/demux/mp4/mp4.c
index 90ff72c..e7b4750 100644
--- a/modules/demux/mp4/mp4.c
+++ b/modules/demux/mp4/mp4.c
@@ -1392,7 +1392,7 @@ static int TrackCreateES( demux_t *p_demux, mp4_track_t *p_track,
p_track->p_sample = p_sample;
- if( p_track->fmt.i_cat == AUDIO_ES && p_track->i_sample_size == 1 )
+ if( p_track->fmt.i_cat == AUDIO_ES && ( p_track->i_sample_size == 1 || p_track->i_sample_size == 2 ) )
{
MP4_Box_data_sample_soun_t *p_soun;
@@ -1427,6 +1427,11 @@ 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( 't', 'w', 'o', 's' ):
+ case VLC_FOURCC( 's', 'o', 'w', 't' ):
+ /* What would be the fun if you could trust the .mov */
+ p_track->i_sample_size = ((p_soun->i_samplesize+7)/8) * p_soun->i_channelcount;
+ break;
default:
break;
}
@@ -1438,7 +1443,6 @@ static int TrackCreateES( demux_t *p_demux, mp4_track_t *p_track,
}
}
-
/* It's a little ugly but .. there are special cases */
switch( p_sample->i_type )
{
More information about the vlc-devel
mailing list