summaryrefslogtreecommitdiff
path: root/libavcodec/options.c
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2013-10-27 13:51:16 +0100
committerAnton Khirnov <anton@khirnov.net>2014-10-18 05:23:51 +0200
commita75c2eb25a62105c09b48521aef429dc8a231637 (patch)
tree231f63b8fe78db74313fd999794d84d8f1b3b509 /libavcodec/options.c
parent946f95354ba76ef73c9b66889d86ab5fba4fb486 (diff)
lavc: make rc_eq into private options of mpegvideo encoders
Diffstat (limited to 'libavcodec/options.c')
-rw-r--r--libavcodec/options.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/libavcodec/options.c b/libavcodec/options.c
index 3acf3afdf0..c00dca078e 100644
--- a/libavcodec/options.c
+++ b/libavcodec/options.c
@@ -27,6 +27,7 @@
#include "avcodec.h"
#include "internal.h"
#include "libavutil/avassert.h"
+#include "libavutil/internal.h"
#include "libavutil/mem.h"
#include "libavutil/opt.h"
#include <float.h> /* FLT_MIN, FLT_MAX */
@@ -174,17 +175,21 @@ int avcodec_copy_context(AVCodecContext *dest, const AVCodecContext *src)
dest->internal = NULL;
/* reallocate values that should be allocated separately */
- dest->rc_eq = NULL;
dest->extradata = NULL;
dest->intra_matrix = NULL;
dest->inter_matrix = NULL;
dest->rc_override = NULL;
dest->subtitle_header = NULL;
+#if FF_API_MPV_OPT
+ FF_DISABLE_DEPRECATION_WARNINGS
+ dest->rc_eq = NULL;
if (src->rc_eq) {
dest->rc_eq = av_strdup(src->rc_eq);
if (!dest->rc_eq)
return AVERROR(ENOMEM);
}
+ FF_ENABLE_DEPRECATION_WARNINGS
+#endif
#define alloc_and_copy_or_fail(obj, size, pad) \
if (src->obj && size > 0) { \
@@ -211,7 +216,11 @@ fail:
av_freep(&dest->intra_matrix);
av_freep(&dest->inter_matrix);
av_freep(&dest->extradata);
+#if FF_API_MPV_OPT
+ FF_DISABLE_DEPRECATION_WARNINGS
av_freep(&dest->rc_eq);
+ FF_ENABLE_DEPRECATION_WARNINGS
+#endif
return AVERROR(ENOMEM);
}