|
|
@ -395,6 +395,14 @@ av_cold int MPV_encode_init(AVCodecContext *avctx) |
|
|
|
return -1; |
|
|
|
return -1; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if ((s->codec_id == CODEC_ID_MPEG4 || s->codec_id == CODEC_ID_H263 || |
|
|
|
|
|
|
|
s->codec_id == CODEC_ID_H263P) && |
|
|
|
|
|
|
|
(avctx->sample_aspect_ratio.num > 255 || avctx->sample_aspect_ratio.den > 255)) { |
|
|
|
|
|
|
|
av_log(avctx, AV_LOG_ERROR, "Invalid pixel aspect ratio %i/%i, limit is 255/255\n", |
|
|
|
|
|
|
|
avctx->sample_aspect_ratio.num, avctx->sample_aspect_ratio.den); |
|
|
|
|
|
|
|
return -1; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if((s->flags & (CODEC_FLAG_INTERLACED_DCT|CODEC_FLAG_INTERLACED_ME|CODEC_FLAG_ALT_SCAN)) |
|
|
|
if((s->flags & (CODEC_FLAG_INTERLACED_DCT|CODEC_FLAG_INTERLACED_ME|CODEC_FLAG_ALT_SCAN)) |
|
|
|
&& s->codec_id != CODEC_ID_MPEG4 && s->codec_id != CODEC_ID_MPEG2VIDEO){ |
|
|
|
&& s->codec_id != CODEC_ID_MPEG4 && s->codec_id != CODEC_ID_MPEG2VIDEO){ |
|
|
|
av_log(avctx, AV_LOG_ERROR, "interlacing not supported by codec\n"); |
|
|
|
av_log(avctx, AV_LOG_ERROR, "interlacing not supported by codec\n"); |
|
|
|