Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
* [FFmpeg-devel] [PATCH 1/4] fftools/cmdutils: only set array size after allocation succeeded
@ 2023-11-07 12:58 Anton Khirnov
  2023-11-07 12:58 ` [FFmpeg-devel] [PATCH 2/4] fftools/ffmpeg_filter: fail on ifilter_alloc() failure Anton Khirnov
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Anton Khirnov @ 2023-11-07 12:58 UTC (permalink / raw)
  To: ffmpeg-devel

---
 fftools/cmdutils.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/fftools/cmdutils.c b/fftools/cmdutils.c
index 156c13801a..86cd3bddb4 100644
--- a/fftools/cmdutils.c
+++ b/fftools/cmdutils.c
@@ -665,10 +665,10 @@ static int init_parse_context(OptionParseContext *octx,
 
     memset(octx, 0, sizeof(*octx));
 
-    octx->nb_groups = nb_groups;
-    octx->groups    = av_calloc(octx->nb_groups, sizeof(*octx->groups));
+    octx->groups    = av_calloc(nb_groups, sizeof(*octx->groups));
     if (!octx->groups)
         return AVERROR(ENOMEM);
+    octx->nb_groups = nb_groups;
 
     for (i = 0; i < octx->nb_groups; i++)
         octx->groups[i].group_def = &groups[i];
-- 
2.42.0

_______________________________________________
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".

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2023-11-09 10:25 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-11-07 12:58 [FFmpeg-devel] [PATCH 1/4] fftools/cmdutils: only set array size after allocation succeeded Anton Khirnov
2023-11-07 12:58 ` [FFmpeg-devel] [PATCH 2/4] fftools/ffmpeg_filter: fail on ifilter_alloc() failure Anton Khirnov
2023-11-07 12:58 ` [FFmpeg-devel] [PATCH 3/4] fftools/ffmpeg_filter: return an error on ofilter_alloc() failure Anton Khirnov
2023-11-07 12:58 ` [FFmpeg-devel] [PATCH 4/4] lavu/log: do not assume AVClass.item_name is always set Anton Khirnov
2023-11-07 20:52   ` James Almer
2023-11-09 10:25     ` Anton Khirnov

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