[vlc-commits] demux: mp4: ensure to read at least a frame
Francois Cartegnie
git at videolan.org
Tue Apr 28 15:28:56 CEST 2020
vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Tue Apr 28 15:20:37 2020 +0200| [d8b91437950732c0f101edb44f5a2c69fb2a3a36] | committer: Francois Cartegnie
demux: mp4: ensure to read at least a frame
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=d8b91437950732c0f101edb44f5a2c69fb2a3a36
---
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 47563f4076..6181ee39dc 100644
--- a/modules/demux/mp4/mp4.c
+++ b/modules/demux/mp4/mp4.c
@@ -3834,7 +3834,7 @@ static uint32_t MP4_TrackGetReadSize( mp4_track_t *p_track, uint32_t *pi_nb_samp
else
{
/* Regular cases */
- uint32_t i_frames = i_max_v0_samples / i_samples_per_frame;
+ uint32_t i_frames = __MAX(i_max_v0_samples / i_samples_per_frame, 1);
*pi_nb_samples = i_frames * i_samples_per_frame;
i_size = i_frames * i_bytes_per_frame;
}
More information about the vlc-commits
mailing list