[vlc-commits] demux: mp4: fix AMR/v0 compressed chunks (fix #14352)
Francois Cartegnie
git at videolan.org
Mon Apr 13 18:13:56 CEST 2015
vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Mon Apr 13 18:10:08 2015 +0200| [1a1f872fae4ecb85fb329a51e34067c4827fb79d] | committer: Francois Cartegnie
demux: mp4: fix AMR/v0 compressed chunks (fix #14352)
AMR is declared as V0, uncompressed chunk.
Reading a max of 1024 samples in that case is too much.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=1a1f872fae4ecb85fb329a51e34067c4827fb79d
---
modules/demux/mp4/mp4.c | 14 ++++++++++++--
1 file changed, 12 insertions(+), 2 deletions(-)
diff --git a/modules/demux/mp4/mp4.c b/modules/demux/mp4/mp4.c
index 642c3ab..bcdf6d0 100644
--- a/modules/demux/mp4/mp4.c
+++ b/modules/demux/mp4/mp4.c
@@ -3124,8 +3124,18 @@ static uint32_t MP4_TrackGetReadSize( mp4_track_t *p_track, uint32_t *pi_nb_samp
break;
}
- if ( *pi_nb_samples == QT_V0_MAX_SAMPLES )
- break;
+ switch( p_track->fmt.i_codec )
+ {
+ case VLC_CODEC_AMR_NB:
+ case VLC_CODEC_AMR_WB:
+ if ( *pi_nb_samples == 16 )
+ i = UINT32_MAX;
+ break;
+ default:
+ if ( *pi_nb_samples == QT_V0_MAX_SAMPLES )
+ i = UINT32_MAX;
+ break;
+ }
}
}
More information about the vlc-commits
mailing list