diff --git a/libavcodec/utils.c b/libavcodec/utils.c index 0bc0b3888f..62d4b264c3 100644 --- a/libavcodec/utils.c +++ b/libavcodec/utils.c @@ -1531,9 +1531,7 @@ int attribute_align_arg avcodec_open2(AVCodecContext *avctx, const AVCodec *code } else if (avctx->channel_layout) { avctx->channels = av_get_channel_layout_nb_channels(avctx->channel_layout); } - if(avctx->codec_type == AVMEDIA_TYPE_VIDEO && - avctx->codec_id != AV_CODEC_ID_PNG // For mplayer - ) { + if(avctx->codec_type == AVMEDIA_TYPE_VIDEO) { if (avctx->width <= 0 || avctx->height <= 0) { av_log(avctx, AV_LOG_ERROR, "dimensions not set\n"); ret = AVERROR(EINVAL);