[vlc-commits] demux: mp4: add missing sample count
Francois Cartegnie
git at videolan.org
Mon May 26 19:46:57 CEST 2014
vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Mon May 26 15:19:18 2014 +0200| [8b16963ed12ab50cce46eaace220c6aed56707fd] | committer: Francois Cartegnie
demux: mp4: add missing sample count
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=8b16963ed12ab50cce46eaace220c6aed56707fd
---
modules/demux/mp4/mp4.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/modules/demux/mp4/mp4.c b/modules/demux/mp4/mp4.c
index 2692ff6..10d2c35 100644
--- a/modules/demux/mp4/mp4.c
+++ b/modules/demux/mp4/mp4.c
@@ -3190,10 +3190,13 @@ static uint32_t MP4_TrackSampleSize( mp4_track_t *p_track, uint32_t *pi_nb_sampl
if( p_track->i_sample_size == 0 )
{
/* most simple case */
+ *pi_nb_samples = 1;
return p_track->p_sample_size[p_track->i_sample];
}
+
if( p_track->fmt.i_cat != AUDIO_ES )
{
+ *pi_nb_samples = 1;
return p_track->i_sample_size;
}
@@ -3209,12 +3212,14 @@ static uint32_t MP4_TrackSampleSize( mp4_track_t *p_track, uint32_t *pi_nb_sampl
i_size *= p_soun->i_bytes_per_frame;
else
i_size = UINT32_MAX;
+ *pi_nb_samples = i_samples;
}
else if( p_track->i_sample_size > 256 )
{
/* We do that so we don't read too much data
* (in this case we are likely dealing with compressed data) */
i_size = p_track->i_sample_size;
+ *pi_nb_samples = 1;
}
else
{
More information about the vlc-commits
mailing list