Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
From: Fredrik Lundkvist via ffmpeg-devel <ffmpeg-devel@ffmpeg.org>
To: "ffmpeg-devel@ffmpeg.org" <ffmpeg-devel@ffmpeg.org>
Cc: Fredrik Lundkvist <fredrik.lundkvist@svt.se>
Subject: Re: [FFmpeg-devel] [PATCH] libsvtav1: Enable 2-pass encoding
Date: Thu, 16 May 2024 06:31:15 +0000
Message-ID: <A5EE3EC8-63B1-4373-AB72-C808A3D67217@svt.se> (raw)

> > + ret = av_reallocp(&param->rc_stats_buffer.buf, param->rc_stats_buffer.sz);

> Why realloc instead of malloc?

As far as I gathered, rc_stats_buffer.buf is already allocated by SVT-AV1; if malloc is preferred, I can change it and test to make sure it doesn’t cause any obvious issues.


> Wouldn't it be safer to free rc_stats_buffer.buf and set rc_stats_buffer.sz to 0 on failure here too?

Absolutely agree on setting rc_stats_buffer.sz to 0, not quite sure about freeing rc_stats_buffer_buf it is allocated by SVT-AV1.

Thank you for the review, the other comments will be fixed in V2.

/Fredrik
_______________________________________________
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:[~2024-05-16  6:31 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-16  6:31 Fredrik Lundkvist via ffmpeg-devel [this message]
2024-05-16  6:59 ` Fredrik Lundkvist via ffmpeg-devel
2024-05-16 10:13 ` Andreas Rheinhardt
  -- strict thread matches above, loose matches on Subject: below --
2024-05-15 14:14 Fredrik Lundkvist via ffmpeg-devel
2024-05-15 14:57 ` James Almer

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=A5EE3EC8-63B1-4373-AB72-C808A3D67217@svt.se \
    --to=ffmpeg-devel@ffmpeg.org \
    --cc=fredrik.lundkvist@svt.se \
    /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