[vlc-commits] demux: mp4: set final codec for sowt/twos before reordering (fix #22420)

Francois Cartegnie git at videolan.org
Fri Jun 14 11:16:01 CEST 2019


vlc/vlc-3.0 | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Thu Jun 13 14:42:41 2019 +0200| [8dde06d13e9ca09fc2524c616310e3e41a3e0232] | committer: Francois Cartegnie

demux: mp4: set final codec for sowt/twos before reordering (fix #22420)

(cherry picked from commit 0c25ba56279fc495afe9d089e2bbcf051a296487)

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

 modules/demux/mp4/essetup.c | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/modules/demux/mp4/essetup.c b/modules/demux/mp4/essetup.c
index 20f8935e76..4e3bf8f13e 100644
--- a/modules/demux/mp4/essetup.c
+++ b/modules/demux/mp4/essetup.c
@@ -1057,8 +1057,14 @@ int SetupAudioES( demux_t *p_demux, mp4_track_t *p_track, MP4_Box_t *p_sample )
         }
 
         case VLC_FOURCC( 't', 'w', 'o', 's' ):
+            p_track->fmt.i_codec = VLC_CODEC_S16B;
+            p_track->fmt.i_original_fourcc = p_sample->i_type;
+            p_track->fmt.audio.i_bitspersample = 16;
+            break;
+
         case VLC_FOURCC( 's', 'o', 'w', 't' ):
-            p_track->fmt.i_codec = p_sample->i_type;
+            p_track->fmt.i_codec = VLC_CODEC_S16L;
+            p_track->fmt.i_original_fourcc = p_sample->i_type;
             p_track->fmt.audio.i_bitspersample = 16;
             break;
 
@@ -1073,7 +1079,7 @@ int SetupAudioES( demux_t *p_demux, mp4_track_t *p_track, MP4_Box_t *p_sample )
             }
             else
             {
-                p_track->fmt.i_codec = VLC_FOURCC( 't', 'w', 'o', 's' );
+                p_track->fmt.i_codec = VLC_CODEC_S16B;
                 p_track->fmt.audio.i_bitspersample = 16;
             }
 



More information about the vlc-commits mailing list