[vlc-commits] demux: mp4: fix reading max samples (fix #12764)
Francois Cartegnie
git at videolan.org
Sat Nov 15 17:10:56 CET 2014
vlc/vlc-2.2 | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Sat Nov 15 14:16:33 2014 +0100| [a20256ad10e3b5fe4737c301240ea32bb7e8b8a5] | committer: Jean-Baptiste Kempf
demux: mp4: fix reading max samples (fix #12764)
p_chunk->i_sample is next sample, not current
(cherry picked from commit 5676fd5bf296cd8c1e4de9029ad8c033062b5faf)
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
> http://git.videolan.org/gitweb.cgi/vlc/vlc-2.2.git/?a=commit;h=a20256ad10e3b5fe4737c301240ea32bb7e8b8a5
---
modules/demux/mp4/mp4.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/modules/demux/mp4/mp4.c b/modules/demux/mp4/mp4.c
index facfcff..51024ef 100644
--- a/modules/demux/mp4/mp4.c
+++ b/modules/demux/mp4/mp4.c
@@ -3425,7 +3425,7 @@ static uint32_t MP4_TrackGetReadSize( mp4_track_t *p_track, uint32_t *pi_nb_samp
{
const MP4_Box_data_sample_soun_t *p_soun = p_track->p_sample->data.p_sample_soun;
const mp4_chunk_t *p_chunk = &p_track->chunk[p_track->i_chunk];
- uint32_t i_max_samples = p_chunk->i_sample_count - p_chunk->i_sample + 1;
+ uint32_t i_max_samples = p_chunk->i_sample_count - p_chunk->i_sample;
/* Group audio packets so we don't call demux for single sample unit */
if( p_track->fmt.i_original_fourcc == VLC_CODEC_DVD_LPCM &&
More information about the vlc-commits
mailing list