1- diff --git a/fftools/opt_common.c b/fftools/opt_common.c
2- index 9d2d5184a0..4f0a8d59ce 100644
3- --- a/fftools/opt_common.c
4- +++ b/fftools/opt_common.c
5- @@ -48,6 +48,9 @@
6- #include "libavformat/avformat.h"
7- #include "libavformat/version.h"
1+ diff --git a/fftools/ffmpeg.h b/fftools/ffmpeg.h
2+ index 733d551fa4..24800ab676 100644
3+ --- a/fftools/ffmpeg.h
4+ +++ b/fftools/ffmpeg.h
5+ @@ -831,7 +831,7 @@ int dec_create(const OptionsContext *o, const char *arg, Scheduler *sch);
6+ * @retval ">=0" non-negative scheduler index on success
7+ * @retval "<0" an error code on failure
8+ */
9+ - int dec_init(Decoder **pdec, Scheduler *sch,
10+ + int dec_open(Decoder **pdec, Scheduler *sch,
11+ AVDictionary **dec_opts, const DecoderOpts *o,
12+ AVFrame *param_out);
13+ void dec_free(Decoder **pdec);
14+ diff --git a/fftools/ffmpeg_dec.c b/fftools/ffmpeg_dec.c
15+ index 2723a0312e..bd8c5c2ee4 100644
16+ --- a/fftools/ffmpeg_dec.c
17+ +++ b/fftools/ffmpeg_dec.c
18+ @@ -829,7 +829,7 @@ static int packet_decode(DecoderPriv *dp, AVPacket *pkt, AVFrame *frame)
19+ }
20+ }
821
9- + #include "libavfilter/avfilter.h"
10- + #include "libavfilter/version.h"
11- +
12- #include "libavdevice/avdevice.h"
13- #include "libavdevice/version.h"
22+ - static int dec_open(DecoderPriv *dp, AVDictionary **dec_opts,
23+ + static int dec_open2(DecoderPriv *dp, AVDictionary **dec_opts,
24+ const DecoderOpts *o, AVFrame *param_out);
25+
26+ static int dec_standalone_open(DecoderPriv *dp, const AVPacket *pkt)
27+ @@ -864,7 +864,7 @@ static int dec_standalone_open(DecoderPriv *dp, const AVPacket *pkt)
28+ snprintf(name, sizeof(name), "dec%d", dp->index);
29+ o.name = name;
30+
31+ - return dec_open(dp, &dp->standalone_init.opts, &o, NULL);
32+ + return dec_open2(dp, &dp->standalone_init.opts, &o, NULL);
33+ }
34+
35+ static void dec_thread_set_name(const DecoderPriv *dp)
36+ @@ -1519,7 +1519,7 @@ static int hw_device_setup_for_decode(DecoderPriv *dp,
37+ return 0;
38+ }
39+
40+ - static int dec_open(DecoderPriv *dp, AVDictionary **dec_opts,
41+ + static int dec_open2(DecoderPriv *dp, AVDictionary **dec_opts,
42+ const DecoderOpts *o, AVFrame *param_out)
43+ {
44+ const AVCodec *codec = o->codec;
45+ @@ -1644,7 +1644,7 @@ static int dec_open(DecoderPriv *dp, AVDictionary **dec_opts,
46+ return 0;
47+ }
48+
49+ - int dec_init(Decoder **pdec, Scheduler *sch,
50+ + int dec_open(Decoder **pdec, Scheduler *sch,
51+ AVDictionary **dec_opts, const DecoderOpts *o,
52+ AVFrame *param_out)
53+ {
54+ @@ -1659,7 +1659,7 @@ int dec_init(Decoder **pdec, Scheduler *sch,
55+
56+ multiview_check_manual(dp, *dec_opts);
57+
58+ - ret = dec_open(dp, dec_opts, o, param_out);
59+ + ret = dec_open2(dp, dec_opts, o, param_out);
60+ if (ret < 0)
61+ goto fail;
62+
63+ diff --git a/fftools/ffmpeg_demux.c b/fftools/ffmpeg_demux.c
64+ index 13aef15eab..5b3c3b588a 100644
65+ --- a/fftools/ffmpeg_demux.c
66+ +++ b/fftools/ffmpeg_demux.c
67+ @@ -948,7 +948,7 @@ static int ist_use(InputStream *ist, int decoding_needed,
68+ if (!ds->decoded_params)
69+ return AVERROR(ENOMEM);
1470
71+ - ret = dec_init(&ist->decoder, d->sch,
72+ + ret = dec_open(&ist->decoder, d->sch,
73+ &ds->decoder_opts, &ds->dec_opts, ds->decoded_params);
74+ if (ret < 0)
75+ return ret;
1576diff --git a/libavcodec/mfenc.c b/libavcodec/mfenc.c
16- index a674a35aa4..d7a52378b5 100644
77+ index b8f8a25f43..323b39267d 100644
1778--- a/libavcodec/mfenc.c
1879+++ b/libavcodec/mfenc.c
19- @@ -59 ,6 +59 ,10 @@ typedef struct MFContext {
80+ @@ -60 ,6 +60 ,10 @@ typedef struct MFContext {
2081 static int mf_choose_output_type(AVCodecContext *avctx);
2182 static int mf_setup_context(AVCodecContext *avctx);
2283
@@ -28,18 +89,18 @@ index a674a35aa4..d7a52378b5 100644
2889 // Sentinel value only used by us.
2990 #define MF_INVALID_TIME AV_NOPTS_VALUE
3091diff --git a/libavfilter/textutils.c b/libavfilter/textutils.c
31- index ef658d04a2..3ecce972f2 100644
92+ index e6b5239b20..1693b04678 100644
3293--- a/libavfilter/textutils.c
3394+++ b/libavfilter/textutils.c
34- @@ -30,6 +30,7 @@
35- #include "libavutil/error.h"
95+ @@ -31,6 +31,7 @@
3696 #include "libavutil/file.h"
97+ #include "libavutil/mem.h"
3798 #include "libavutil/time.h"
3899+ #include "libavutil/time_internal.h"
39100
40101 static int ff_expand_text_function_internal(FFExpandTextContext *expand_text, AVBPrint *bp,
41102 char *name, unsigned argc, char **argv)
42- @@ -189 ,7 +190 ,7 @@ int ff_print_pts(void *log_ctx, AVBPrint *bp, double pts, const char *delta,
103+ @@ -190 ,7 +191 ,7 @@ int ff_print_pts(void *log_ctx, AVBPrint *bp, double pts, const char *delta,
43104 if (!strcmp(fmt, "localtime"))
44105 localtime_r(&ms, &tm);
45106 else
@@ -48,7 +109,7 @@ index ef658d04a2..3ecce972f2 100644
48109 av_bprint_strftime(bp, av_x_if_null(strftime_fmt, "%Y-%m-%d %H:%M:%S"), &tm);
49110 } else {
50111 av_log(log_ctx, AV_LOG_ERROR, "Invalid format '%s'\n", fmt);
51- @@ -219 ,7 +220 ,7 @@ int ff_print_time(void *log_ctx, AVBPrint *bp,
112+ @@ -220 ,7 +221 ,7 @@ int ff_print_time(void *log_ctx, AVBPrint *bp,
52113 if (localtime)
53114 localtime_r(&now, &tm);
54115 else
0 commit comments