[vlc-commits] demux: mp4: fix divbyzero with broken audio stsd
Francois Cartegnie
git at videolan.org
Tue Dec 30 20:43:09 CET 2014
vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Tue Dec 30 20:40:53 2014 +0100| [9e2ed89062e3d47b66fa7f9611fce20d5deda2a6] | committer: Francois Cartegnie
demux: mp4: fix divbyzero with broken audio stsd
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=9e2ed89062e3d47b66fa7f9611fce20d5deda2a6
---
modules/demux/mp4/mp4.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/modules/demux/mp4/mp4.c b/modules/demux/mp4/mp4.c
index 97d94fb..debb56f 100644
--- a/modules/demux/mp4/mp4.c
+++ b/modules/demux/mp4/mp4.c
@@ -3113,7 +3113,8 @@ static uint64_t MP4_TrackGetPos( mp4_track_t *p_track )
p_track->p_sample->data.p_sample_soun;
if( p_track->fmt.i_cat != AUDIO_ES || p_soun->i_qt_version == 0 ||
- p_track->fmt.audio.i_blockalign <= 1 )
+ p_track->fmt.audio.i_blockalign <= 1 ||
+ p_soun->i_sample_per_packet * p_soun->i_bytes_per_frame == 0 )
{
i_pos += ( p_track->i_sample -
p_track->chunk[p_track->i_chunk].i_sample_first ) *
More information about the vlc-commits
mailing list