Mercurial > libavformat.hg
changeset 2385:8a7b2fac0a98 libavformat
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
author | aurel |
---|---|
date | Tue, 14 Aug 2007 15:51:30 +0000 |
parents | 2b7be8fd6390 |
children | 2beaa59babad |
files | flic.c |
diffstat | 1 files changed, 8 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/flic.c Tue Aug 14 03:00:56 2007 +0000 +++ b/flic.c Tue Aug 14 15:51:30 2007 +0000 @@ -94,8 +94,14 @@ 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;