mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2026-06-24 08:48:37 +00:00
avformat/mov: fix crash when stsz_sample_size is zero and sample_sizes is null
Co-Authored-by: James Almer <jamrial@gmail.com> Signed-off-by: Zhao Zhili <zhilizhao@tencent.com> (cherry picked from commitcac5018eb9) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> (cherry picked from commit55da57f723) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
committed by
Michael Niedermayer
parent
22ab1ba6bd
commit
4a2540316d
@@ -5033,7 +5033,8 @@ static int sanity_checks(void *log_obj, MOVStreamContext *sc, int index)
|
||||
{
|
||||
if ((sc->chunk_count && (!sc->stts_count || !sc->stsc_count ||
|
||||
(!sc->sample_size && !sc->sample_count))) ||
|
||||
(!sc->chunk_count && sc->sample_count)) {
|
||||
(sc->sample_count && (!sc->chunk_count ||
|
||||
(!sc->sample_size && !sc->sample_sizes)))) {
|
||||
av_log(log_obj, AV_LOG_ERROR, "stream %d, missing mandatory atoms, broken header\n",
|
||||
index);
|
||||
return 1;
|
||||
|
||||
Reference in New Issue
Block a user