diff --git a/libavcodec/mdec.c b/libavcodec/mdec.c
index d6e5d044a03abae3f61c3ccfd4338e1b9466db76..afe122cfe8d5147459136b2b88e24492062b07ea 100644
--- a/libavcodec/mdec.c
+++ b/libavcodec/mdec.c
@@ -239,6 +239,7 @@ static int decode_init(AVCodecContext *avctx){
 */
     p->qstride= a->mb_width;
     p->qscale_table= av_mallocz( p->qstride * a->mb_height);
+    avctx->pix_fmt= PIX_FMT_YUV420P;
 
     return 0;
 }