summaryrefslogtreecommitdiff
path: root/libavcodec/interplayvideo.c
diff options
context:
space:
mode:
authorKostya Shishkov <kostya.shishkov@gmail.com>2009-12-27 14:07:21 +0000
committerKostya Shishkov <kostya.shishkov@gmail.com>2009-12-27 14:07:21 +0000
commitda937668583afbb7af9b8fa0713797226eda485c (patch)
tree9f16ab0484af43596231ead77100fa7495a4b5a3 /libavcodec/interplayvideo.c
parent03703cb3d10b03f3ac8d599c9935a5285b411966 (diff)
16-bit Interplay video does not need palette control
Originally committed as revision 20936 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/interplayvideo.c')
-rw-r--r--libavcodec/interplayvideo.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/libavcodec/interplayvideo.c b/libavcodec/interplayvideo.c
index e56b924360..8992a1de30 100644
--- a/libavcodec/interplayvideo.c
+++ b/libavcodec/interplayvideo.c
@@ -1017,13 +1017,13 @@ static av_cold int ipvideo_decode_init(AVCodecContext *avctx)
s->avctx = avctx;
- if (s->avctx->palctrl == NULL) {
+ s->is_16bpp = avctx->bits_per_coded_sample == 16;
+ avctx->pix_fmt = s->is_16bpp ? PIX_FMT_RGB555 : PIX_FMT_PAL8;
+ if (!s->is_16bpp && s->avctx->palctrl == NULL) {
av_log(avctx, AV_LOG_ERROR, " Interplay video: palette expected.\n");
return -1;
}
- s->is_16bpp = avctx->bits_per_coded_sample == 16;
- avctx->pix_fmt = s->is_16bpp ? PIX_FMT_RGB555 : PIX_FMT_PAL8;
dsputil_init(&s->dsp, avctx);
/* decoding map contains 4 bits of information per 8x8 block */