diff --git a/libavcodec/h263dec.c b/libavcodec/h263dec.c index c5e38fdd84..4ef7825f0c 100644 --- a/libavcodec/h263dec.c +++ b/libavcodec/h263dec.c @@ -548,6 +548,12 @@ retry: if ((ret = ff_mpv_common_frame_size_change(s))) return ret; + + if (avctx->pix_fmt != h263_get_format(avctx)) { + av_log(avctx, AV_LOG_ERROR, "format change not supported\n"); + avctx->pix_fmt = AV_PIX_FMT_NONE; + return AVERROR_UNKNOWN; + } } if (s->codec_id == AV_CODEC_ID_H263 ||