Commit fc45e6cb authored by Francois Cartegnie's avatar Francois Cartegnie Committed by Jean-Baptiste Kempf

demux: mp4: fix heap buffer ofw with zero chunk (fix #12356)

(cherry picked from commit 929970aecfc91725ba243953ccb5197fa797c0a8)
Signed-off-by: default avatarJean-Baptiste Kempf <jb@videolan.org>
parent 5249240c
...@@ -2118,7 +2118,7 @@ static void TrackGetESSampleRate( demux_t *p_demux, ...@@ -2118,7 +2118,7 @@ static void TrackGetESSampleRate( demux_t *p_demux,
return; return;
} }
if( p_track->i_chunk_count <= 0 ) if( p_track->i_chunk_count == 0 )
return; return;
/* */ /* */
...@@ -2158,7 +2158,7 @@ static int TrackCreateES( demux_t *p_demux, mp4_track_t *p_track, ...@@ -2158,7 +2158,7 @@ static int TrackCreateES( demux_t *p_demux, mp4_track_t *p_track,
demux_sys_t *p_sys = p_demux->p_sys; demux_sys_t *p_sys = p_demux->p_sys;
unsigned int i_sample_description_index; unsigned int i_sample_description_index;
if( p_sys->b_fragmented ) if( p_sys->b_fragmented || p_track->i_chunk_count == 0 )
i_sample_description_index = 1; /* XXX */ i_sample_description_index = 1; /* XXX */
else else
i_sample_description_index = i_sample_description_index =
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment