Try size 640x480 for FLC files which don't specify their size.

This is a ugly hack to fix playback of specular.flc.
closes issue71

Originally committed as revision 10117 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
Aurelien Jacobs 2007-08-14 15:51:30 +00:00
parent f5da5c935d
commit 77cb22fa7b
1 changed files with 8 additions and 2 deletions

View File

@ -94,8 +94,14 @@ static int flic_read_header(AVFormatContext *s,
st->codec->width = AV_RL16(&header[0x08]); st->codec->width = AV_RL16(&header[0x08]);
st->codec->height = AV_RL16(&header[0x0A]); st->codec->height = AV_RL16(&header[0x0A]);
if (!st->codec->width || !st->codec->height) if (!st->codec->width || !st->codec->height) {
return AVERROR_INVALIDDATA; /* Ugly hack needed for the following sample: */
/* http://samples.mplayerhq.hu/fli-flc/fli-bugs/specular.flc */
av_log(s, AV_LOG_WARNING,
"File with no specified width/height. Trying 640x480.\n");
st->codec->width = 640;
st->codec->height = 480;
}
/* send over the whole 128-byte FLIC header */ /* send over the whole 128-byte FLIC header */
st->codec->extradata_size = FLIC_HEADER_SIZE; st->codec->extradata_size = FLIC_HEADER_SIZE;