diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-12-11 18:25:56 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-12-11 22:04:00 +0100 |
commit | e8e575633faf19711910cf9caf59f7db300a9ccd (patch) | |
tree | 6ed1299534e7bb20f330edb3f6c051dc7153bafe /libavcodec/utils.c | |
parent | bbc8f0cd9b899b58edc7640a2e63bc545bc80493 (diff) | |
download | ffmpeg-streaming-e8e575633faf19711910cf9caf59f7db300a9ccd.zip ffmpeg-streaming-e8e575633faf19711910cf9caf59f7db300a9ccd.tar.gz |
lavc/utils: Do not require dimensions for PNG.
pngenc doesnt need them and mplayer doesnt set them.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/utils.c')
-rw-r--r-- | libavcodec/utils.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libavcodec/utils.c b/libavcodec/utils.c index 0a0c446..5ec99d0 100644 --- a/libavcodec/utils.c +++ b/libavcodec/utils.c @@ -1000,7 +1000,9 @@ 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) { + if(avctx->codec_type == AVMEDIA_TYPE_VIDEO && + avctx->codec_id != AV_CODEC_ID_PNG // For mplayer + ) { if (avctx->width <= 0 || avctx->height <= 0) { av_log(avctx, AV_LOG_ERROR, "dimensions not set\n"); ret = AVERROR(EINVAL); |