[FFmpeg-cvslog] avcodec/bsf/dts2pts: don't zero the node buffers when allocating them

James Almer git at videolan.org
Fri Sep 20 05:23:46 EEST 2024


ffmpeg | branch: master | James Almer <jamrial at gmail.com> | Thu Sep 19 23:21:20 2024 -0300| [2eef902d38dded68df7d874bc348aaa42ec87933] | committer: James Almer

avcodec/bsf/dts2pts: don't zero the node buffers when allocating them

It's unnecessary as the entire struct is written to immediately after it's
allocated.
Restores the behavior prior to fec6a8df3127795f0796f73494df7f27fe354550.

Signed-off-by: James Almer <jamrial at gmail.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=2eef902d38dded68df7d874bc348aaa42ec87933
---

 libavcodec/bsf/dts2pts.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/libavcodec/bsf/dts2pts.c b/libavcodec/bsf/dts2pts.c
index 2be79c624b..62838d4f7b 100644
--- a/libavcodec/bsf/dts2pts.c
+++ b/libavcodec/bsf/dts2pts.c
@@ -396,7 +396,8 @@ static int dts2pts_init(AVBSFContext *ctx)
     if (!s->fifo)
         return AVERROR(ENOMEM);
 
-    s->node_pool = ff_refstruct_pool_alloc(sizeof(DTS2PTSNode), 0);
+    s->node_pool = ff_refstruct_pool_alloc(sizeof(DTS2PTSNode),
+                                           FF_REFSTRUCT_POOL_FLAG_NO_ZEROING);
 
     if (!s->node_pool)
         return AVERROR(ENOMEM);



More information about the ffmpeg-cvslog mailing list