mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-11-21 10:55:51 +02:00
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. Reviewed-by: Michael Niedermayer <michaelni@gmx.at> Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
This commit is contained in:
parent
3232ac4bac
commit
83a04f8cc1
@ -2587,6 +2587,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;
|
||||
|
Loading…
Reference in New Issue
Block a user