mirror of
https://github.com/xenia-project/FFmpeg.git
synced 2025-02-12 23:50:59 +00:00
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>
This commit is contained in:
parent
ee769c6a7c
commit
ede3d6400d
@ -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)
|
static av_cold int mss1_decode_init(AVCodecContext *avctx)
|
||||||
{
|
{
|
||||||
MSS1Context * const c = avctx->priv_data;
|
MSS1Context * const c = avctx->priv_data;
|
||||||
|
int ret;
|
||||||
|
|
||||||
c->ctx.avctx = avctx;
|
c->ctx.avctx = avctx;
|
||||||
avctx->coded_frame = &c->pic;
|
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)
|
static av_cold int mss1_decode_end(AVCodecContext *avctx)
|
||||||
|
@ -690,10 +690,6 @@ av_cold int ff_mss12_decode_init(MSS12Context *c, int version)
|
|||||||
return AVERROR(ENOMEM);
|
return AVERROR(ENOMEM);
|
||||||
}
|
}
|
||||||
|
|
||||||
avctx->pix_fmt = version ? c->free_colours == 127 ? PIX_FMT_RGB555
|
|
||||||
: PIX_FMT_RGB24
|
|
||||||
: PIX_FMT_PAL8;
|
|
||||||
|
|
||||||
codec_init(c, version);
|
codec_init(c, version);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -844,6 +844,10 @@ static av_cold int mss2_decode_init(AVCodecContext *avctx)
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
ff_mss2dsp_init(&ctx->dsp);
|
ff_mss2dsp_init(&ctx->dsp);
|
||||||
|
|
||||||
|
avctx->pix_fmt = c->free_colours == 127 ? PIX_FMT_RGB555
|
||||||
|
: PIX_FMT_RGB24;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user