demux: mp4: set bitpersample for raw audio
authorFrancois Cartegnie <fcvlcdev@free.fr>
Wed, 13 Feb 2019 11:11:15 +0000 (12:11 +0100)
committerFrancois Cartegnie <fcvlcdev@free.fr>
Wed, 13 Feb 2019 11:11:15 +0000 (12:11 +0100)
modules/demux/mp4/essetup.c

index 9e18888..32622b9 100644 (file)
@@ -1080,9 +1080,15 @@ int SetupAudioES( demux_t *p_demux, mp4_track_t *p_track, MP4_Box_t *p_sample )
         case( VLC_FOURCC( 'N', 'O', 'N', 'E' ) ):
         {
             if( (p_soun->i_samplesize+7)/8 == 1 )
+            {
                 p_track->fmt.i_codec = VLC_CODEC_U8;
+                p_track->fmt.audio.i_bitspersample = 8;
+            }
             else
+            {
                 p_track->fmt.i_codec = VLC_FOURCC( 't', 'w', 'o', 's' );
+                p_track->fmt.audio.i_bitspersample = 16;
+            }
             p_track->fmt.i_original_fourcc = p_track->fmt.i_codec;
 
             /* Buggy files workaround */