]> git.sesse.net Git - ffmpeg/commitdiff
Revert "lavc/utils: Do not require dimensions for PNG."
authorDerek Buitenhuis <derek.buitenhuis@gmail.com>
Sun, 13 Jul 2014 18:32:56 +0000 (19:32 +0100)
committerDerek Buitenhuis <derek.buitenhuis@gmail.com>
Sun, 10 Aug 2014 14:58:13 +0000 (15:58 +0100)
mplayer-specifc hacks should not be in our codebase. mplayer should fix
its own code. It is not our responsibility to work around their broken
code.

This reverts commit e8e575633faf19711910cf9caf59f7db300a9ccd.

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
libavcodec/utils.c

index 0bc0b3888f55b46adf039ff043f84eaaa910bbf2..62d4b264c30921b89259f1434f6e65f29f6beda7 100644 (file)
@@ -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);