aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat
diff options
context:
space:
mode:
authorAurelien Jacobs <aurel@gnuage.org>2007-08-14 15:51:30 +0000
committerAurelien Jacobs <aurel@gnuage.org>2007-08-14 15:51:30 +0000
commit77cb22fa7b3f632c16aa3d4e7aa7d47f9cd99f2c (patch)
tree60e4ce1cb0ff6655c432431babc0604742656944 /libavformat
parentf5da5c935dae8a997316f59699f3d560106e99ce (diff)
downloadffmpeg-77cb22fa7b3f632c16aa3d4e7aa7d47f9cd99f2c.tar.gz
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
Diffstat (limited to 'libavformat')
-rw-r--r--libavformat/flic.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/libavformat/flic.c b/libavformat/flic.c
index 7ad25c2bff..a85cb97df4 100644
--- a/libavformat/flic.c
+++ b/libavformat/flic.c
@@ -94,8 +94,14 @@ static int flic_read_header(AVFormatContext *s,
st->codec->width = AV_RL16(&header[0x08]);
st->codec->height = AV_RL16(&header[0x0A]);
- if (!st->codec->width || !st->codec->height)
- return AVERROR_INVALIDDATA;
+ if (!st->codec->width || !st->codec->height) {
+ /* 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 */
st->codec->extradata_size = FLIC_HEADER_SIZE;