diff mbox series

[FFmpeg-devel,5/6] avcodec/libx264: Use dedicated pointer for accesses

Message ID AS8P250MB074466D96D717AF3E2049DF88FB99@AS8P250MB0744.EURP250.PROD.OUTLOOK.COM
State Accepted
Commit 19e35edaf1f44f19932cdfbc01fec19fc49ed5a2
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 | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)
diff mbox series

Patch

diff --git a/libavcodec/libx264.c b/libavcodec/libx264.c
index df70e9df9b..94006d2b20 100644
--- a/libavcodec/libx264.c
+++ b/libavcodec/libx264.c
@@ -498,19 +498,19 @@  FF_ENABLE_DEPRECATION_WARNINGS
             goto fail;
 
         if (sei_data) {
-            pic->extra_sei.payloads = av_mallocz(sizeof(pic->extra_sei.payloads[0]));
-            if (pic->extra_sei.payloads == NULL) {
+            sei->payloads = av_mallocz(sizeof(sei->payloads[0]));
+            if (!sei->payloads) {
                 av_free(sei_data);
                 ret = AVERROR(ENOMEM);
                 goto fail;
             }
 
-            pic->extra_sei.sei_free = av_free;
+            sei->sei_free = av_free;
 
-            pic->extra_sei.payloads[0].payload_size = sei_size;
-            pic->extra_sei.payloads[0].payload = sei_data;
-            pic->extra_sei.num_payloads = 1;
-            pic->extra_sei.payloads[0].payload_type = 4;
+            sei->payloads[0].payload_size = sei_size;
+            sei->payloads[0].payload      = sei_data;
+            sei->payloads[0].payload_type = 4;
+            sei->num_payloads = 1;
         }
     }