[FFmpeg-devel] [PATCH 1/2] fftools/ffmpeg_opt: hide a few deprecation warnings.
Nicolas George
george at nsup.org
Sun Dec 8 13:47:58 EET 2019
Signed-off-by: Nicolas George <george at nsup.org>
---
fftools/ffmpeg_opt.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/fftools/ffmpeg_opt.c b/fftools/ffmpeg_opt.c
index 71063cc443..5ce70db23e 100644
--- a/fftools/ffmpeg_opt.c
+++ b/fftools/ffmpeg_opt.c
@@ -34,6 +34,7 @@
#include "libavutil/avstring.h"
#include "libavutil/avutil.h"
#include "libavutil/channel_layout.h"
+#include "libavutil/internal.h"
#include "libavutil/intreadwrite.h"
#include "libavutil/fifo.h"
#include "libavutil/mathematics.h"
@@ -796,6 +797,7 @@ static void add_input_streams(OptionsContext *o, AVFormatContext *ic)
if(!ist->dec)
ist->dec = avcodec_find_decoder(par->codec_id);
#if FF_API_LOWRES
+FF_DISABLE_DEPRECATION_WARNINGS
if (st->codec->lowres) {
ist->dec_ctx->lowres = st->codec->lowres;
ist->dec_ctx->width = st->codec->width;
@@ -803,6 +805,7 @@ static void add_input_streams(OptionsContext *o, AVFormatContext *ic)
ist->dec_ctx->coded_width = st->codec->coded_width;
ist->dec_ctx->coded_height = st->codec->coded_height;
}
+FF_ENABLE_DEPRECATION_WARNINGS
#endif
// avformat_find_stream_info() doesn't set this for us anymore.
@@ -2398,9 +2401,12 @@ loop_end:
if ((ost->stream_copy || ost->attachment_filename)
&& (e = av_dict_get(o->g->codec_opts, "flags", NULL, AV_DICT_IGNORE_SUFFIX))
- && (!e->key[5] || check_stream_specifier(oc, ost->st, e->key+6)))
+ && (!e->key[5] || check_stream_specifier(oc, ost->st, e->key+6))) {
+FF_DISABLE_DEPRECATION_WARNINGS
if (av_opt_set(ost->st->codec, "flags", e->value, 0) < 0)
exit_program(1);
+FF_ENABLE_DEPRECATION_WARNINGS
+ }
}
#endif
--
2.24.0
More information about the ffmpeg-devel
mailing list