[vlc-commits] demux: mp4: move built-in sample size fixes out from es setup

Francois Cartegnie git at videolan.org
Sat Jun 13 18:11:46 CEST 2015


vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Fri Jun 12 16:17:29 2015 +0200| [dc526f0a6783ed688001cabe206fb5033be01006] | committer: Francois Cartegnie

demux: mp4: move built-in sample size fixes out from es setup

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

 modules/demux/mp4/essetup.c |    7 -------
 modules/demux/mp4/mp4.c     |    3 ++-
 2 files changed, 2 insertions(+), 8 deletions(-)

diff --git a/modules/demux/mp4/essetup.c b/modules/demux/mp4/essetup.c
index cb2a169..5ba3950 100644
--- a/modules/demux/mp4/essetup.c
+++ b/modules/demux/mp4/essetup.c
@@ -422,13 +422,6 @@ int SetupAudioES( demux_t *p_demux, mp4_track_t *p_track, MP4_Box_t *p_sample )
                 p_soun->i_bytes_per_frame   = 2 * p_soun->i_channelcount;
                 p_soun->i_bytes_per_sample  = 2;
                 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 */
-                p_track->i_sample_size = ((p_soun->i_samplesize+7)/8) * p_soun->i_channelcount;
-                break;
             default:
                 p_track->fmt.i_codec = p_sample->i_type;
                 break;
diff --git a/modules/demux/mp4/mp4.c b/modules/demux/mp4/mp4.c
index c01730d..4331465 100644
--- a/modules/demux/mp4/mp4.c
+++ b/modules/demux/mp4/mp4.c
@@ -3026,13 +3026,14 @@ static inline uint32_t MP4_GetFixedSampleSize( const mp4_track_t *p_track,
 
      /* QuickTime "built-in" support case fixups */
     if( p_track->fmt.i_cat == AUDIO_ES &&
-        p_soun->i_compressionid == 0 && p_track->i_sample_size == 1 )
+        p_soun->i_compressionid == 0 && (p_track->i_sample_size == 1 || p_track->i_sample_size == 1) )
     {
         switch( p_track->fmt.i_codec )
         {
         case VLC_CODEC_GSM:
             i_size = p_soun->i_channelcount;
             break;
+        case VLC_FOURCC( 'N', 'O', 'N', 'E' ):
         case ATOM_twos:
         case ATOM_sowt:
         case ATOM_raw:



More information about the vlc-commits mailing list