diff --git a/libavcodec/mdec.c b/libavcodec/mdec.c
index 606a749695050d639700a43a9608b926756ca57e..83e1f7ce9c7deefc41fcbe03ceb70f221ab9820d 100644
--- a/libavcodec/mdec.c
+++ b/libavcodec/mdec.c
@@ -229,9 +229,11 @@ static av_cold int decode_init(AVCodecContext *avctx){
     ff_mpeg12_init_vlcs();
     ff_init_scantable(a->dsp.idct_permutation, &a->scantable, ff_zigzag_direct);
 
+    if( avctx->idct_algo == FF_IDCT_AUTO )
+        avctx->idct_algo = FF_IDCT_SIMPLE;
     p->qstride= 0;
     p->qscale_table= av_mallocz(a->mb_width);
-    avctx->pix_fmt= PIX_FMT_YUV420P;
+    avctx->pix_fmt= PIX_FMT_YUVJ420P;
 
     return 0;
 }