Commit 4e7b3ef3 authored by Michael Niedermayer's avatar Michael Niedermayer

cinepak: Fix division by zero, ask for sample if encoded_buf_size is 0

Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 12d9a364
......@@ -330,6 +330,10 @@ static int cinepak_decode (CinepakContext *s)
/* if this is the first frame, check for deviant Sega FILM data */
if (s->sega_film_skip_bytes == -1) {
if (!encoded_buf_size){
av_log_ask_for_sample(s->avctx, "encoded_buf_size is 0");
return -1;
}
if (encoded_buf_size != s->size && (s->size % encoded_buf_size) != 0) {
/* If the encoded frame size differs from the frame size as indicated
* by the container file, this data likely comes from a Sega FILM/CPK file.
......
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