Mercurial > libavformat.hg
diff avidec.c @ 227:b0d2d719ae41 libavformat
hacks to support Xan AVI files
| author | tmmm |
|---|---|
| date | Mon, 08 Sep 2003 04:17:40 +0000 |
| parents | 6c9d6422a2f6 |
| children | f174d9c00bce |
line wrap: on
line diff
--- a/avidec.c Mon Sep 08 04:15:27 2003 +0000 +++ b/avidec.c Mon Sep 08 04:17:40 2003 +0000 @@ -88,6 +88,7 @@ unsigned int size, nb_frames; int i, n; AVStream *st; + int xan_video = 0; /* hack to support Xan A/V */ if (get_riff(avi, pb) < 0) return -1; @@ -274,12 +275,18 @@ st->codec.codec_type = CODEC_TYPE_VIDEO; st->codec.codec_tag = tag1; st->codec.codec_id = codec_get_id(codec_bmp_tags, tag1); + if (st->codec.codec_id == CODEC_ID_XAN_WC4) + xan_video = 1; // url_fskip(pb, size - 5 * 4); break; case CODEC_TYPE_AUDIO: get_wav_header(pb, &st->codec, size); if (size%2) /* 2-aligned (fix for Stargate SG-1 - 3x18 - Shades of Grey.avi) */ url_fskip(pb, 1); + /* special case time: To support Xan DPCM, hardcode + * the format if Xxan is the video codec */ + if (xan_video) + st->codec.codec_id = CODEC_ID_XAN_DPCM; break; default: url_fskip(pb, size);
