[ffmpeg] branch master updated (de3f99d74b -> 39661f9295)
This is an automated email from the git hooks/post-receive script. Git pushed a change to branch master in repository ffmpeg. from de3f99d74b avformat/cafenc: Truncate values for avio_w8() new 67c87cde99 avfilter/formats,vsrc_testsrc: use type-safe formats functions new 39661f9295 fftools/ffmpeg_{filter,mux_init}: Improve type-safety The 2 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference. Summary of changes: fftools/ffmpeg.h | 5 ++++- fftools/ffmpeg_filter.c | 15 +++++++++------ fftools/ffmpeg_mux_init.c | 4 ++-- libavfilter/formats.c | 4 ++-- libavfilter/vsrc_testsrc.c | 4 ++-- 5 files changed, 19 insertions(+), 13 deletions(-)
This is an automated email from the git hooks/post-receive script. Git pushed a commit to branch master in repository ffmpeg. commit 67c87cde99662e55b58e2b47f040a3b38ae9be88 Author: Andreas Rheinhardt <andreas.rheinhardt@outlook.com> AuthorDate: Fri Jan 30 00:56:49 2026 +0100 Commit: Andreas Rheinhardt <andreas.rheinhardt@outlook.com> CommitDate: Fri Jan 30 15:20:08 2026 +0100 avfilter/formats,vsrc_testsrc: use type-safe formats functions Reviewed-by: Niklas Haas <ffmpeg@haasn.dev> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com> --- libavfilter/formats.c | 4 ++-- libavfilter/vsrc_testsrc.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/libavfilter/formats.c b/libavfilter/formats.c index 2186eb1619..6fbdeb2d26 100644 --- a/libavfilter/formats.c +++ b/libavfilter/formats.c @@ -1179,11 +1179,11 @@ int ff_default_query_formats(AVFilterContext *ctx) switch (f->formats_state) { case FF_FILTER_FORMATS_PIXFMT_LIST: type = AVMEDIA_TYPE_VIDEO; - formats = ff_make_format_list(f->formats.pixels_list); + formats = ff_make_pixel_format_list(f->formats.pixels_list); break; case FF_FILTER_FORMATS_SAMPLEFMTS_LIST: type = AVMEDIA_TYPE_AUDIO; - formats = ff_make_format_list(f->formats.samples_list); + formats = ff_make_sample_format_list(f->formats.samples_list); break; case FF_FILTER_FORMATS_SINGLE_PIXFMT: type = AVMEDIA_TYPE_VIDEO; diff --git a/libavfilter/vsrc_testsrc.c b/libavfilter/vsrc_testsrc.c index 4d7288f18a..bfc3491596 100644 --- a/libavfilter/vsrc_testsrc.c +++ b/libavfilter/vsrc_testsrc.c @@ -1493,7 +1493,7 @@ static int smptebars_query_formats(const AVFilterContext *ctx, if ((ret = ff_set_common_color_ranges2(ctx, cfg_in, cfg_out, ff_make_formats_list_singleton(AVCOL_RANGE_MPEG)))) return ret; - return ff_set_common_formats_from_list2(ctx, cfg_in, cfg_out, smptebars_pix_fmts); + return ff_set_pixel_formats_from_list2(ctx, cfg_in, cfg_out, smptebars_pix_fmts); } AVFILTER_DEFINE_CLASS_EXT(palbars, "pal(75|100)bars", options); @@ -2260,7 +2260,7 @@ static int zoneplate_query_formats(const AVFilterContext *ctx, if ((ret = ff_set_common_color_ranges2(ctx, cfg_in, cfg_out, ff_make_formats_list_singleton(AVCOL_RANGE_JPEG)))) return ret; - return ff_set_common_formats_from_list2(ctx, cfg_in, cfg_out, zoneplate_pix_fmts); + return ff_set_pixel_formats_from_list2(ctx, cfg_in, cfg_out, zoneplate_pix_fmts); } static const AVFilterPad avfilter_vsrc_zoneplate_outputs[] = {
This is an automated email from the git hooks/post-receive script. Git pushed a commit to branch master in repository ffmpeg. commit 39661f92954c93f2f259df4ab8fcffd83e7aefd5 Author: Andreas Rheinhardt <andreas.rheinhardt@outlook.com> AuthorDate: Fri Jan 30 01:01:45 2026 +0100 Commit: Andreas Rheinhardt <andreas.rheinhardt@outlook.com> CommitDate: Fri Jan 30 15:20:08 2026 +0100 fftools/ffmpeg_{filter,mux_init}: Improve type-safety Reviewed-by: Niklas Haas <ffmpeg@haasn.dev> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com> --- fftools/ffmpeg.h | 5 ++++- fftools/ffmpeg_filter.c | 15 +++++++++------ fftools/ffmpeg_mux_init.c | 4 ++-- 3 files changed, 15 insertions(+), 9 deletions(-) diff --git a/fftools/ffmpeg.h b/fftools/ffmpeg.h index 7720dd9c59..3e66534d48 100644 --- a/fftools/ffmpeg.h +++ b/fftools/ffmpeg.h @@ -347,7 +347,10 @@ typedef struct OutputFilterOptions { int sample_rate; AVChannelLayout ch_layout; - const int *formats; + union { + const enum AVPixelFormat *pix_fmts; + const enum AVSampleFormat *sample_fmts; + }; const int *sample_rates; const AVChannelLayout *ch_layouts; const AVRational *frame_rates; diff --git a/fftools/ffmpeg_filter.c b/fftools/ffmpeg_filter.c index 4387c992da..765b65d0ec 100644 --- a/fftools/ffmpeg_filter.c +++ b/fftools/ffmpeg_filter.c @@ -223,7 +223,10 @@ typedef struct OutputFilterPriv { // those are only set if no format is specified and the encoder gives us multiple options // They point directly to the relevant lists of the encoder. - const int *formats; + union { + const enum AVPixelFormat *pix_fmts; + const enum AVSampleFormat *sample_fmts; + }; const AVChannelLayout *ch_layouts; const int *sample_rates; const enum AVColorSpace *color_spaces; @@ -399,10 +402,10 @@ static void choose_ ## name (OutputFilterPriv *ofp, AVBPrint *bprint) \ av_bprint_chars(bprint, ':', 1); \ } -DEF_CHOOSE_FORMAT(pix_fmts, enum AVPixelFormat, format, formats, +DEF_CHOOSE_FORMAT(pix_fmts, enum AVPixelFormat, format, pix_fmts, AV_PIX_FMT_NONE, "%s", av_get_pix_fmt_name) -DEF_CHOOSE_FORMAT(sample_fmts, enum AVSampleFormat, format, formats, +DEF_CHOOSE_FORMAT(sample_fmts, enum AVSampleFormat, format, sample_fmts, AV_SAMPLE_FMT_NONE, "%s", av_get_sample_fmt_name) DEF_CHOOSE_FORMAT(sample_rates, int, sample_rate, sample_rates, 0, @@ -859,7 +862,7 @@ int ofilter_bind_enc(OutputFilter *ofilter, unsigned sched_idx_enc, if (opts->format != AV_PIX_FMT_NONE) { ofp->format = opts->format; } else - ofp->formats = opts->formats; + ofp->pix_fmts = opts->pix_fmts; if (opts->color_space != AVCOL_SPC_UNSPECIFIED) ofp->color_space = opts->color_space; @@ -898,7 +901,7 @@ int ofilter_bind_enc(OutputFilter *ofilter, unsigned sched_idx_enc, if (opts->format != AV_SAMPLE_FMT_NONE) { ofp->format = opts->format; } else { - ofp->formats = opts->formats; + ofp->sample_fmts = opts->sample_fmts; } if (opts->sample_rate) { ofp->sample_rate = opts->sample_rate; @@ -1702,7 +1705,7 @@ static int configure_output_video_filter(FilterGraphPriv *fgp, AVFilterGraph *gr } av_assert0(!(ofp->flags & OFILTER_FLAG_DISABLE_CONVERT) || - ofp->format != AV_PIX_FMT_NONE || !ofp->formats); + ofp->format != AV_PIX_FMT_NONE || !ofp->pix_fmts); av_bprint_init(&bprint, 0, AV_BPRINT_SIZE_UNLIMITED); choose_pix_fmts(ofp, &bprint); choose_color_spaces(ofp, &bprint); diff --git a/fftools/ffmpeg_mux_init.c b/fftools/ffmpeg_mux_init.c index 0569f62836..4cb8f91d6e 100644 --- a/fftools/ffmpeg_mux_init.c +++ b/fftools/ffmpeg_mux_init.c @@ -949,7 +949,7 @@ ost_bind_filter(const Muxer *mux, MuxStream *ms, OutputFilter *ofilter, if (!keep_pix_fmt) { ret = avcodec_get_supported_config(enc_ctx, NULL, AV_CODEC_CONFIG_PIX_FORMAT, 0, - (const void **) &opts.formats, NULL); + (const void **) &opts.pix_fmts, NULL); if (ret < 0) return ret; } @@ -978,7 +978,7 @@ ost_bind_filter(const Muxer *mux, MuxStream *ms, OutputFilter *ofilter, } else { ret = avcodec_get_supported_config(enc_ctx, NULL, AV_CODEC_CONFIG_SAMPLE_FORMAT, 0, - (const void **) &opts.formats, NULL); + (const void **) &opts.sample_fmts, NULL); if (ret < 0) return ret; ret = avcodec_get_supported_config(enc_ctx, NULL,
participants (2)
-
Andreas Rheinhardt -
ffmpeg-git