summaryrefslogtreecommitdiff
path: root/libavcodec/mss1.c
diff options
context:
space:
mode:
authorAlberto Delmás <adelmas@gmail.com>2012-08-31 07:59:36 +0200
committerKostya Shishkov <kostya.shishkov@gmail.com>2012-08-31 08:08:43 +0200
commitede3d6400d7c06863e6eb4bcff5f676480ae6b5e (patch)
treef20968e85f3701cd55e7d426b340337f6b4d427d /libavcodec/mss1.c
parentee769c6a7c1d4ec6560f5e5a6f457b770b10fb33 (diff)
MSS1 and MSS2: set final pixel format after common stuff has been initialised
This way it won't interfere with WMV9 initialisation inside MSS2 decoder and avplay will play it fine. Signed-off-by: Kostya Shishkov <kostya.shishkov@gmail.com>
Diffstat (limited to 'libavcodec/mss1.c')
-rw-r--r--libavcodec/mss1.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/libavcodec/mss1.c b/libavcodec/mss1.c
index ada479eee7..caf0328ad0 100644
--- a/libavcodec/mss1.c
+++ b/libavcodec/mss1.c
@@ -189,11 +189,16 @@ static int mss1_decode_frame(AVCodecContext *avctx, void *data, int *data_size,
static av_cold int mss1_decode_init(AVCodecContext *avctx)
{
MSS1Context * const c = avctx->priv_data;
+ int ret;
c->ctx.avctx = avctx;
avctx->coded_frame = &c->pic;
- return ff_mss12_decode_init(&c->ctx, 0);
+ ret = ff_mss12_decode_init(&c->ctx, 0);
+
+ avctx->pix_fmt = PIX_FMT_PAL8;
+
+ return ret;
}
static av_cold int mss1_decode_end(AVCodecContext *avctx)