diff --git a/libavcodec/utvideo.c b/libavcodec/utvideo.c index a3b0d7cf01..e5efa4a7ec 100644 --- a/libavcodec/utvideo.c +++ b/libavcodec/utvideo.c @@ -439,10 +439,17 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, plane_start[i], c->frame_pred == PRED_LEFT); if (ret) return ret; - if (c->frame_pred == PRED_MEDIAN) - restore_median(c->pic.data[0] + rgb_order[i], c->planes, - c->pic.linesize[0], avctx->width, avctx->height, - c->slices, 0); + if (c->frame_pred == PRED_MEDIAN) { + if (!c->interlaced) { + restore_median(c->pic.data[0] + rgb_order[i], c->planes, + c->pic.linesize[0], avctx->width, + avctx->height, c->slices, 0); + } else { + restore_median_il(c->pic.data[0] + rgb_order[i], c->planes, + c->pic.linesize[0], avctx->width, + avctx->height, c->slices, 0); + } + } } restore_rgb_planes(c->pic.data[0], c->planes, c->pic.linesize[0], avctx->width, avctx->height);