[vlc-commits] demux: mp4: don't set invalid rate in audio v1
Francois Cartegnie
git at videolan.org
Mon Mar 8 14:46:36 UTC 2021
vlc/vlc-3.0 | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Mon Mar 8 15:42:04 2021 +0100| [13ed1894659d7ce705b59f789b60cac35a53ced9] | committer: Francois Cartegnie
demux: mp4: don't set invalid rate in audio v1
refs #25481
> http://git.videolan.org/gitweb.cgi/vlc/vlc-3.0.git/?a=commit;h=13ed1894659d7ce705b59f789b60cac35a53ced9
---
modules/demux/mp4/libmp4.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/modules/demux/mp4/libmp4.c b/modules/demux/mp4/libmp4.c
index 48cf23c271..62dc308db5 100644
--- a/modules/demux/mp4/libmp4.c
+++ b/modules/demux/mp4/libmp4.c
@@ -2618,6 +2618,14 @@ static int MP4_ReadBox_sample_soun( stream_t *p_stream, MP4_Box_t *p_box )
if( p_box->data.p_sample_soun->i_qt_version == 1 && i_read >= 16 )
{
/* SoundDescriptionV1 */
+
+ if( p_box->data.p_sample_soun->i_sampleratehi == 0x1 && //65536
+ p_box->data.p_sample_soun->i_sampleratelo == 0x0 ) //remainder
+ {
+ /* ISOBMFF sets to 1 << 16, qtff does not */
+ p_box->data.p_sample_soun->i_sampleratehi = 0;
+ }
+
MP4_GET4BYTES( p_box->data.p_sample_soun->i_sample_per_packet );
MP4_GET4BYTES( p_box->data.p_sample_soun->i_bytes_per_packet );
MP4_GET4BYTES( p_box->data.p_sample_soun->i_bytes_per_frame );
More information about the vlc-commits
mailing list