diff mbox series

[FFmpeg-devel,4/6] avcodec/libx264: Pass x264_picture_t* directly

Message ID AS8P250MB0744C96715BA9177579E3AF78FB99@AS8P250MB0744.EURP250.PROD.OUTLOOK.COM
State Accepted
Commit df53d7a19424698b0d8f6f7cc8907b03dfcabba8
Headers show
Series [FFmpeg-devel,1/3] avfilter/vf_ssim360: Use correct type in sizeof | expand

Checks

Context Check Description
yinshiyou/make_loongarch64 success Make finished
yinshiyou/make_fate_loongarch64 success Make fate finished
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished

Commit Message

Andreas Rheinhardt March 13, 2023, 1:22 p.m. UTC
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
---
 libavcodec/libx264.c | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)
diff mbox series

Patch

diff --git a/libavcodec/libx264.c b/libavcodec/libx264.c
index e59939a8a7..df70e9df9b 100644
--- a/libavcodec/libx264.c
+++ b/libavcodec/libx264.c
@@ -311,11 +311,8 @@  static void reconfig_encoder(AVCodecContext *ctx, const AVFrame *frame)
     }
 }
 
-static void free_picture(AVCodecContext *ctx)
+static void free_picture(x264_picture_t *pic)
 {
-    X264Context *x4 = ctx->priv_data;
-    x264_picture_t *pic = &x4->pic;
-
     for (int i = 0; i < pic->extra_sei.num_payloads; i++)
         av_free(pic->extra_sei.payloads[i].payload);
     av_freep(&pic->extra_sei.payloads);
@@ -554,7 +551,7 @@  FF_ENABLE_DEPRECATION_WARNINGS
     return 0;
 
 fail:
-    free_picture(ctx);
+    free_picture(pic);
     *ppic = NULL;
     return ret;
 }