Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
From: Marvin Scholz <epirat07@gmail.com>
To: ffmpeg-devel@ffmpeg.org
Cc: Marvin Scholz <epirat07@gmail.com>
Subject: [FFmpeg-devel] [PATCH v2 01/31] fftools: use av_dict_iterate
Date: Sat, 26 Nov 2022 15:46:18 +0100
Message-ID: <20221126144648.73162-2-epirat07@gmail.com> (raw)
In-Reply-To: <20221126144648.73162-1-epirat07@gmail.com>

---
 fftools/cmdutils.c      | 2 +-
 fftools/ffmpeg.c        | 2 +-
 fftools/ffmpeg_demux.c  | 5 ++---
 fftools/ffmpeg_filter.c | 3 +--
 fftools/ffmpeg_opt.c    | 2 +-
 fftools/ffplay.c        | 4 ++--
 fftools/ffprobe.c       | 6 +++---
 7 files changed, 11 insertions(+), 13 deletions(-)

diff --git a/fftools/cmdutils.c b/fftools/cmdutils.c
index beef8ce385..a1de621d1c 100644
--- a/fftools/cmdutils.c
+++ b/fftools/cmdutils.c
@@ -921,7 +921,7 @@ AVDictionary *filter_codec_opts(AVDictionary *opts, enum AVCodecID codec_id,
         break;
     }
 
-    while (t = av_dict_get(opts, "", t, AV_DICT_IGNORE_SUFFIX)) {
+    while (t = av_dict_iterate(opts, t)) {
         const AVClass *priv_class;
         char *p = strchr(t->key, ':');
 
diff --git a/fftools/ffmpeg.c b/fftools/ffmpeg.c
index 3767ab444b..0aeb06e5d5 100644
--- a/fftools/ffmpeg.c
+++ b/fftools/ffmpeg.c
@@ -620,7 +620,7 @@ void remove_avoptions(AVDictionary **a, AVDictionary *b)
 {
     const AVDictionaryEntry *t = NULL;
 
-    while ((t = av_dict_get(b, "", t, AV_DICT_IGNORE_SUFFIX))) {
+    while ((t = av_dict_iterate(b, t))) {
         av_dict_set(a, t->key, NULL, AV_DICT_MATCH_CASE);
     }
 }
diff --git a/fftools/ffmpeg_demux.c b/fftools/ffmpeg_demux.c
index 2ac1d795b2..e845e6784d 100644
--- a/fftools/ffmpeg_demux.c
+++ b/fftools/ffmpeg_demux.c
@@ -1082,13 +1082,12 @@ int ifile_open(const OptionsContext *o, const char *filename)
     unused_opts = strip_specifiers(o->g->codec_opts);
     for (i = 0; i < f->nb_streams; i++) {
         e = NULL;
-        while ((e = av_dict_get(f->streams[i]->decoder_opts, "", e,
-                                AV_DICT_IGNORE_SUFFIX)))
+        while ((e = av_dict_iterate(f->streams[i]->decoder_opts, e)))
             av_dict_set(&unused_opts, e->key, NULL, 0);
     }
 
     e = NULL;
-    while ((e = av_dict_get(unused_opts, "", e, AV_DICT_IGNORE_SUFFIX))) {
+    while ((e = av_dict_iterate(unused_opts, e))) {
         const AVClass *class = avcodec_get_class();
         const AVOption *option = av_opt_find(&class, e->key, NULL, 0,
                                              AV_OPT_SEARCH_CHILDREN | AV_OPT_SEARCH_FAKE_OBJ);
diff --git a/fftools/ffmpeg_filter.c b/fftools/ffmpeg_filter.c
index 5d50092b72..b0c4c8ece3 100644
--- a/fftools/ffmpeg_filter.c
+++ b/fftools/ffmpeg_filter.c
@@ -452,8 +452,7 @@ static int configure_output_video_filter(FilterGraph *fg, OutputFilter *ofilter,
         snprintf(args, sizeof(args), "%d:%d",
                  ofilter->width, ofilter->height);
 
-        while ((e = av_dict_get(ost->sws_dict, "", e,
-                                AV_DICT_IGNORE_SUFFIX))) {
+        while ((e = av_dict_iterate(ost->sws_dict, e))) {
             av_strlcatf(args, sizeof(args), ":%s=%s", e->key, e->value);
         }
 
diff --git a/fftools/ffmpeg_opt.c b/fftools/ffmpeg_opt.c
index a9dcf0e088..3df02b7d7f 100644
--- a/fftools/ffmpeg_opt.c
+++ b/fftools/ffmpeg_opt.c
@@ -169,7 +169,7 @@ AVDictionary *strip_specifiers(const AVDictionary *dict)
     const AVDictionaryEntry *e = NULL;
     AVDictionary    *ret = NULL;
 
-    while ((e = av_dict_get(dict, "", e, AV_DICT_IGNORE_SUFFIX))) {
+    while ((e = av_dict_iterate(dict, e))) {
         char *p = strchr(e->key, ':');
 
         if (p)
diff --git a/fftools/ffplay.c b/fftools/ffplay.c
index bcc00afe31..fc7e1c2fb1 100644
--- a/fftools/ffplay.c
+++ b/fftools/ffplay.c
@@ -1860,7 +1860,7 @@ static int configure_video_filters(AVFilterGraph *graph, VideoState *is, const c
     }
     pix_fmts[nb_pix_fmts] = AV_PIX_FMT_NONE;
 
-    while ((e = av_dict_get(sws_dict, "", e, AV_DICT_IGNORE_SUFFIX))) {
+    while ((e = av_dict_iterate(sws_dict, e))) {
         if (!strcmp(e->key, "sws_flags")) {
             av_strlcatf(sws_flags_str, sizeof(sws_flags_str), "%s=%s:", "flags", e->value);
         } else
@@ -1966,7 +1966,7 @@ static int configure_audio_filters(VideoState *is, const char *afilters, int for
 
     av_bprint_init(&bp, 0, AV_BPRINT_SIZE_AUTOMATIC);
 
-    while ((e = av_dict_get(swr_opts, "", e, AV_DICT_IGNORE_SUFFIX)))
+    while ((e = av_dict_iterate(swr_opts, e)))
         av_strlcatf(aresample_swr_opts, sizeof(aresample_swr_opts), "%s=%s:", e->key, e->value);
     if (strlen(aresample_swr_opts))
         aresample_swr_opts[strlen(aresample_swr_opts)-1] = '\0';
diff --git a/fftools/ffprobe.c b/fftools/ffprobe.c
index f46925618c..d2f126d9d6 100644
--- a/fftools/ffprobe.c
+++ b/fftools/ffprobe.c
@@ -656,7 +656,7 @@ static int writer_open(WriterContext **wctx, const Writer *writer, const char *a
             goto fail;
         }
 
-        while ((opt = av_dict_get(opts, "", opt, AV_DICT_IGNORE_SUFFIX))) {
+        while ((opt = av_dict_iterate(opts, opt))) {
             if ((ret = av_opt_set(*wctx, opt->key, opt->value, AV_OPT_SEARCH_CHILDREN)) < 0) {
                 av_log(*wctx, AV_LOG_ERROR, "Failed to set option '%s' with value '%s' provided to writer context\n",
                        opt->key, opt->value);
@@ -1945,7 +1945,7 @@ static inline int show_tags(WriterContext *w, AVDictionary *tags, int section_id
         return 0;
     writer_print_section_header(w, section_id);
 
-    while ((tag = av_dict_get(tags, "", tag, AV_DICT_IGNORE_SUFFIX))) {
+    while ((tag = av_dict_iterate(tags, tag))) {
         if ((ret = print_str_validate(tag->key, tag->value)) < 0)
             break;
     }
@@ -3315,7 +3315,7 @@ static int open_input_file(InputFile *ifile, const char *filename,
     ifile->fmt_ctx = fmt_ctx;
     if (scan_all_pmts_set)
         av_dict_set(&format_opts, "scan_all_pmts", NULL, AV_DICT_MATCH_CASE);
-    while ((t = av_dict_get(format_opts, "", t, AV_DICT_IGNORE_SUFFIX)))
+    while ((t = av_dict_iterate(format_opts, t)))
         av_log(NULL, AV_LOG_WARNING, "Option %s skipped - not known to demuxer.\n", t->key);
 
     if (find_stream_info) {
-- 
2.37.0 (Apple Git-136)

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".

  reply	other threads:[~2022-11-26 14:47 UTC|newest]

Thread overview: 72+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-25  1:30 [FFmpeg-devel] [PATCH 00/31] Use av_dict_iterate where approproate Marvin Scholz
2022-11-25  1:30 ` [FFmpeg-devel] [PATCH 01/31] fftools: use av_dict_iterate Marvin Scholz
2022-11-25  1:30 ` [FFmpeg-devel] [PATCH 02/31] fftools: use av_dict_get_string Marvin Scholz
2022-11-25 12:48   ` Andreas Rheinhardt
2022-11-25  1:30 ` [FFmpeg-devel] [PATCH 03/31] avcodec/librav1e: use av_dict_iterate Marvin Scholz
2022-11-25  1:30 ` [FFmpeg-devel] [PATCH 04/31] avcodec/librav1e: remove unnecessary variable Marvin Scholz
2022-11-25  1:30 ` [FFmpeg-devel] [PATCH 05/31] avcodec/libvpxenc: use av_dict_iterate Marvin Scholz
2022-11-25  1:30 ` [FFmpeg-devel] [PATCH 06/31] avformat/smjpegenc: " Marvin Scholz
2022-11-25  1:30 ` [FFmpeg-devel] [PATCH 07/31] avutil: " Marvin Scholz
2022-11-25 12:50   ` Andreas Rheinhardt
2022-11-26 14:42     ` Marvin Scholz
2022-11-27 13:59       ` James Almer
2022-11-25  1:30 ` [FFmpeg-devel] [PATCH 08/31] avfilter/vf_scale: " Marvin Scholz
2022-11-25  1:30 ` [FFmpeg-devel] [PATCH 09/31] avfilter/vf_coreimage: " Marvin Scholz
2022-11-25  1:30 ` [FFmpeg-devel] [PATCH 10/31] avcodec/libxavs2: " Marvin Scholz
2022-11-25  1:30 ` [FFmpeg-devel] [PATCH 11/31] avcodec/avpacket: " Marvin Scholz
2022-11-25  1:30 ` [FFmpeg-devel] [PATCH 12/31] avformat/vorbiscomment: " Marvin Scholz
2022-11-25  1:30 ` [FFmpeg-devel] [PATCH 13/31] avfilter/vf_libvmaf: " Marvin Scholz
2022-11-25  1:30 ` [FFmpeg-devel] [PATCH 14/31] avfilter/f_metadata: " Marvin Scholz
2022-11-25  1:30 ` [FFmpeg-devel] [PATCH 15/31] avformat/cafenc: " Marvin Scholz
2022-11-25  1:30 ` [FFmpeg-devel] [PATCH 16/31] doc/examples/metadata: " Marvin Scholz
2022-11-25  1:30 ` [FFmpeg-devel] [PATCH 17/31] avformat/movenc: " Marvin Scholz
2022-11-25  1:30 ` [FFmpeg-devel] [PATCH 18/31] avformat/metadata: " Marvin Scholz
2022-11-25  1:30 ` [FFmpeg-devel] [PATCH 19/31] avformat/flvenc: " Marvin Scholz
2022-11-25  1:30 ` [FFmpeg-devel] [PATCH 20/31] avformat/hls: " Marvin Scholz
2022-11-25  1:30 ` [FFmpeg-devel] [PATCH 21/31] avformat/lrcenc: " Marvin Scholz
2022-11-25  1:30 ` [FFmpeg-devel] [PATCH 22/31] avformat/dump: " Marvin Scholz
2022-11-25  1:30 ` [FFmpeg-devel] [PATCH 23/31] avformat/wtvenc: " Marvin Scholz
2022-11-25 12:53   ` Andreas Rheinhardt
2022-11-25  1:30 ` [FFmpeg-devel] [PATCH 24/31] avformat/ffmetaenc: " Marvin Scholz
2022-11-25  1:30 ` [FFmpeg-devel] [PATCH 25/31] avformat/id3v2enc: " Marvin Scholz
2022-11-25  1:30 ` [FFmpeg-devel] [PATCH 26/31] avformat/nutenc: " Marvin Scholz
2022-11-25  1:30 ` [FFmpeg-devel] [PATCH 27/31] avformat/apetag: " Marvin Scholz
2022-11-25  1:30 ` [FFmpeg-devel] [PATCH 28/31] avformat/asfenc: " Marvin Scholz
2022-11-25  1:30 ` [FFmpeg-devel] [PATCH 29/31] avformat/http: " Marvin Scholz
2022-11-25  1:30 ` [FFmpeg-devel] [PATCH 30/31] avformat/matroskaenc: " Marvin Scholz
2022-11-25  1:30 ` [FFmpeg-devel] [PATCH 31/31] avformat/fifo: " Marvin Scholz
2022-11-26 14:46 ` [FFmpeg-devel] [PATCH v2 00/31] Use av_dict_iterate where approproate Marvin Scholz
2022-11-26 14:46   ` Marvin Scholz [this message]
2022-11-26 14:46   ` [FFmpeg-devel] [PATCH v2 02/31] fftools: use av_dict_get_string Marvin Scholz
2022-11-26 14:46   ` [FFmpeg-devel] [PATCH v2 03/31] avcodec/librav1e: use av_dict_iterate Marvin Scholz
2022-11-26 14:46   ` [FFmpeg-devel] [PATCH v2 04/31] avcodec/librav1e: remove unnecessary variable Marvin Scholz
2022-11-26 14:46   ` [FFmpeg-devel] [PATCH v2 05/31] avcodec/libvpxenc: use av_dict_iterate Marvin Scholz
2022-11-30 20:18     ` James Zern
2022-11-26 14:46   ` [FFmpeg-devel] [PATCH v2 06/31] avformat/smjpegenc: " Marvin Scholz
2022-11-26 14:46   ` [FFmpeg-devel] [PATCH v2 07/31] avutil: " Marvin Scholz
2022-11-27 15:06     ` James Almer
2022-11-30 22:06       ` Marvin Scholz
2022-11-26 14:46   ` [FFmpeg-devel] [PATCH v2 08/31] avfilter/vf_scale: " Marvin Scholz
2022-11-26 14:46   ` [FFmpeg-devel] [PATCH v2 09/31] avfilter/vf_coreimage: " Marvin Scholz
2022-11-26 14:46   ` [FFmpeg-devel] [PATCH v2 10/31] avcodec/libxavs2: " Marvin Scholz
2022-11-26 14:46   ` [FFmpeg-devel] [PATCH v2 11/31] avcodec/avpacket: " Marvin Scholz
2022-11-26 14:46   ` [FFmpeg-devel] [PATCH v2 12/31] avformat/vorbiscomment: " Marvin Scholz
2022-11-26 14:46   ` [FFmpeg-devel] [PATCH v2 13/31] avfilter/vf_libvmaf: " Marvin Scholz
2022-11-26 14:46   ` [FFmpeg-devel] [PATCH v2 14/31] avfilter/f_metadata: " Marvin Scholz
2022-11-26 14:46   ` [FFmpeg-devel] [PATCH v2 15/31] avformat/cafenc: " Marvin Scholz
2022-11-26 14:46   ` [FFmpeg-devel] [PATCH v2 16/31] doc/examples/metadata: " Marvin Scholz
2022-11-26 14:46   ` [FFmpeg-devel] [PATCH v2 17/31] avformat/movenc: " Marvin Scholz
2022-11-26 14:46   ` [FFmpeg-devel] [PATCH v2 18/31] avformat/metadata: " Marvin Scholz
2022-11-26 14:46   ` [FFmpeg-devel] [PATCH v2 19/31] avformat/flvenc: " Marvin Scholz
2022-11-26 14:46   ` [FFmpeg-devel] [PATCH v2 20/31] avformat/hls: " Marvin Scholz
2022-11-26 14:46   ` [FFmpeg-devel] [PATCH v2 21/31] avformat/lrcenc: " Marvin Scholz
2022-11-26 14:46   ` [FFmpeg-devel] [PATCH v2 22/31] avformat/dump: " Marvin Scholz
2022-11-26 14:46   ` [FFmpeg-devel] [PATCH v2 23/31] avformat/wtvenc: " Marvin Scholz
2022-11-26 14:46   ` [FFmpeg-devel] [PATCH v2 24/31] avformat/ffmetaenc: " Marvin Scholz
2022-11-26 14:46   ` [FFmpeg-devel] [PATCH v2 25/31] avformat/id3v2enc: " Marvin Scholz
2022-11-26 14:46   ` [FFmpeg-devel] [PATCH v2 26/31] avformat/nutenc: " Marvin Scholz
2022-11-26 14:46   ` [FFmpeg-devel] [PATCH v2 27/31] avformat/apetag: " Marvin Scholz
2022-11-26 14:46   ` [FFmpeg-devel] [PATCH v2 28/31] avformat/asfenc: " Marvin Scholz
2022-11-26 14:46   ` [FFmpeg-devel] [PATCH v2 29/31] avformat/http: " Marvin Scholz
2022-11-26 14:46   ` [FFmpeg-devel] [PATCH v2 30/31] avformat/matroskaenc: " Marvin Scholz
2022-11-26 14:46   ` [FFmpeg-devel] [PATCH v2 31/31] avformat/fifo: " Marvin Scholz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20221126144648.73162-2-epirat07@gmail.com \
    --to=epirat07@gmail.com \
    --cc=ffmpeg-devel@ffmpeg.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \
		ffmpegdev@gitmailbox.com
	public-inbox-index ffmpegdev

Example config snippet for mirrors.


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git