Commit cd765156 authored by melanson's avatar melanson

automatically detect Cinepak data from Sega FILM/CPK files


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@4525 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 36250a3a
......@@ -316,12 +316,21 @@ static int cinepak_decode (CinepakContext *s)
uint8_t *eod = (s->data + s->size);
int i, result, strip_size, frame_flags, num_strips;
int y0 = 0;
int encoded_buf_size;
/* if true, Cinepak data is from a Sega FILM/CPK file */
int sega_film_data = 0;
if (s->size < 10)
return -1;
frame_flags = s->data[0];
num_strips = BE_16 (&s->data[8]);
encoded_buf_size = BE_16 (&s->data[2]);
if (encoded_buf_size != s->size)
sega_film_data = 1;
if (sega_film_data)
s->data += 12;
else
s->data += 10;
if (num_strips > MAX_STRIPS)
......
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