summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2004-04-23 21:17:31 +0000
committerMichael Niedermayer <michaelni@gmx.at>2004-04-23 21:17:31 +0000
commit1671083f55132a48154b9f898c1cf4308ded17aa (patch)
tree7701f2498081c6e5061b0c3c843f4e0338369bb8
parentdf70de1f61c844f3ceb34abe5b424d9acd50d0f2 (diff)
sanity check
Originally committed as revision 3047 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r--libavcodec/mpegvideo.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/libavcodec/mpegvideo.c b/libavcodec/mpegvideo.c
index d92914bb66..67316e949e 100644
--- a/libavcodec/mpegvideo.c
+++ b/libavcodec/mpegvideo.c
@@ -956,7 +956,13 @@ int MPV_encode_init(AVCodecContext *avctx)
av_log(avctx, AV_LOG_ERROR, "b frames not supported by codec\n");
return -1;
}
-
+
+ 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){
+ av_log(avctx, AV_LOG_ERROR, "interlacing not supported by codec\n");
+ return -1;
+ }
+
if(s->mpeg_quant && s->codec_id != CODEC_ID_MPEG4){ //FIXME mpeg2 uses that too
av_log(avctx, AV_LOG_ERROR, "mpeg2 style quantization not supporetd by codec\n");
return -1;