Skip to content
Snippets Groups Projects
Commit cffb9ea8 authored by Andreas Cadhalpun's avatar Andreas Cadhalpun Committed by Luca Barbato
Browse files

mov: reject zero bytes_per_frame with non-zero samples_per_frame


In this case the mov demuxer can return a large number of empty packets.

Signed-off-by: default avatarAndreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Signed-off-by: default avatarLuca Barbato <lu_zero@gentoo.org>
parent 8e9c39e8
No related branches found
No related tags found
No related merge requests found
......@@ -2263,6 +2263,13 @@ static void mov_build_index(MOVContext *mov, AVStream *st)
AVIndexEntry *e;
unsigned size, samples;
if (sc->samples_per_frame > 1 && !sc->bytes_per_frame) {
avpriv_request_sample(mov->fc,
"Zero bytes per frame, but %d samples per frame",
sc->samples_per_frame);
return;
}
if (sc->samples_per_frame >= 160) { // gsm
samples = sc->samples_per_frame;
size = sc->bytes_per_frame;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment