summaryrefslogtreecommitdiff
path: root/libavcodec/mpegvideo_enc.c
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2011-08-27 10:16:14 +0200
committerAnton Khirnov <anton@khirnov.net>2011-08-31 13:25:18 +0200
commit4623420d84e97d141c20078cfa09c7568f693bd5 (patch)
tree84969fd04f76c854818d040c7fde0c63c0d6a475 /libavcodec/mpegvideo_enc.c
parent0cc06b9e23bc798b1af3302d095db23f000a97e6 (diff)
mpeg4enc: add 'data_partitioning' private option.
Deprecate CODEC_FLAG_PART
Diffstat (limited to 'libavcodec/mpegvideo_enc.c')
-rw-r--r--libavcodec/mpegvideo_enc.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/libavcodec/mpegvideo_enc.c b/libavcodec/mpegvideo_enc.c
index 1f8f9f49d6..47f431c1a9 100644
--- a/libavcodec/mpegvideo_enc.c
+++ b/libavcodec/mpegvideo_enc.c
@@ -305,7 +305,10 @@ av_cold int MPV_encode_init(AVCodecContext *avctx)
s->luma_elim_threshold = avctx->luma_elim_threshold;
s->chroma_elim_threshold= avctx->chroma_elim_threshold;
s->strict_std_compliance= avctx->strict_std_compliance;
- s->data_partitioning= avctx->flags & CODEC_FLAG_PART;
+#if FF_API_MPEGVIDEO_GLOBAL_OPTS
+ if (avctx->flags & CODEC_FLAG_PART)
+ s->data_partitioning = 1;
+#endif
s->quarter_sample= (avctx->flags & CODEC_FLAG_QPEL)!=0;
s->mpeg_quant= avctx->mpeg_quant;
s->rtp_mode= !!avctx->rtp_payload_size;
@@ -402,10 +405,12 @@ av_cold int MPV_encode_init(AVCodecContext *avctx)
return -1;
}
+#if FF_API_MPEGVIDEO_GLOBAL_OPTS
if(s->data_partitioning && s->codec_id != CODEC_ID_MPEG4){
av_log(avctx, AV_LOG_ERROR, "data partitioning not supported by codec\n");
return -1;
}
+#endif
if(s->max_b_frames && s->codec_id != CODEC_ID_MPEG4 && s->codec_id != CODEC_ID_MPEG1VIDEO && s->codec_id != CODEC_ID_MPEG2VIDEO){
av_log(avctx, AV_LOG_ERROR, "b frames not supported by codec\n");