From: epirat07@gmail.com To: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org> Subject: Re: [FFmpeg-devel] [PATCH 3/6] avformat/tee: Constify AVDictionaryEntry* pointee where possible Date: Fri, 17 May 2024 17:42:24 +0200 Message-ID: <1296CAFB-CC81-442A-88D6-7CBC1E1F6C52@gmail.com> (raw) In-Reply-To: <AS8P250MB0744973ED04B3FA8F778ED958FEE2@AS8P250MB0744.EURP250.PROD.OUTLOOK.COM> On 17 May 2024, at 17:25, Andreas Rheinhardt wrote: > This is in preparation for using av_dict_iterate(). > > Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com> > --- > libavformat/tee.c | 7 ++++--- > 1 file changed, 4 insertions(+), 3 deletions(-) > > diff --git a/libavformat/tee.c b/libavformat/tee.c > index 1cbbb80dbb..87159681ed 100644 > --- a/libavformat/tee.c > +++ b/libavformat/tee.c > @@ -158,7 +158,7 @@ static int open_slave(AVFormatContext *avf, char *slave, TeeSlave *tee_slave) > { > int i, ret; > AVDictionary *options = NULL, *bsf_options = NULL; > - AVDictionaryEntry *entry; > + const AVDictionaryEntry *entry; > char *filename; > char *format = NULL, *select = NULL, *on_fail = NULL; > char *use_fifo = NULL, *fifo_options_str = NULL; > @@ -172,8 +172,9 @@ static int open_slave(AVFormatContext *avf, char *slave, TeeSlave *tee_slave) > return ret; > > #define CONSUME_OPTION(option, field, action) do { \ > - if ((entry = av_dict_get(options, option, NULL, 0))) { \ > - field = entry->value; \ > + AVDictionaryEntry *en = av_dict_get(options, option, NULL, 0); \ > + if (en) { \ > + field = en->value; \ > { action } \ > av_dict_set(&options, option, NULL, 0); \ > } \ > -- > 2.40.1 > LGTM, thanks! > _______________________________________________ > 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". _______________________________________________ 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".
next prev parent reply other threads:[~2024-05-17 15:42 UTC|newest] Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top 2024-05-17 15:23 [FFmpeg-devel] [PATCH 1/6] avformat/utils: Use static mutexes instead of ff_lock_avformat() Andreas Rheinhardt 2024-05-17 15:25 ` [FFmpeg-devel] [PATCH 2/6] avformat/tls_openssl: #if ff_openssl_init/deinit() away if possible Andreas Rheinhardt 2024-05-17 15:25 ` [FFmpeg-devel] [PATCH 3/6] avformat/tee: Constify AVDictionaryEntry* pointee where possible Andreas Rheinhardt 2024-05-17 15:42 ` epirat07 [this message] 2024-05-17 16:17 ` Andreas Rheinhardt 2024-05-17 15:25 ` [FFmpeg-devel] [PATCH 4/6] avformat/tee: Use smaller scope for variables Andreas Rheinhardt 2024-05-17 15:25 ` [FFmpeg-devel] [PATCH 5/6] avcodec/lib*, avformat/tee: Simplify iterating over AVDictionary Andreas Rheinhardt 2024-05-17 15:41 ` epirat07 2024-05-17 15:44 ` Andreas Rheinhardt 2024-05-17 15:48 ` epirat07 2024-05-17 15:25 ` [FFmpeg-devel] [PATCH 6/6] fftools, avfilter, avformat: Simplify check for "is dictionary empty?" Andreas Rheinhardt 2024-05-17 15:39 ` epirat07 2024-05-19 9:57 ` [FFmpeg-devel] [PATCH 1/6] avformat/utils: Use static mutexes instead of ff_lock_avformat() Andreas Rheinhardt
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=1296CAFB-CC81-442A-88D6-7CBC1E1F6C52@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