[FFmpeg-cvslog] vaapi_encode: Delete unused field

Mark Thompson git at videolan.org
Sat Aug 1 19:41:03 EEST 2020


ffmpeg | branch: master | Mark Thompson <sw at jkqxz.net> | Tue Jul 28 23:50:23 2020 +0100| [c67bdd6534a0ee67c0d18aed0e3345e59464254f] | committer: Mark Thompson

vaapi_encode: Delete unused field

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

 libavcodec/vaapi_encode.c | 12 ++++--------
 libavcodec/vaapi_encode.h |  1 -
 2 files changed, 4 insertions(+), 9 deletions(-)

diff --git a/libavcodec/vaapi_encode.c b/libavcodec/vaapi_encode.c
index 4544090bcc..b3a02459f1 100644
--- a/libavcodec/vaapi_encode.c
+++ b/libavcodec/vaapi_encode.c
@@ -607,11 +607,9 @@ fail_with_picture:
 fail:
     for(i = 0; i < pic->nb_param_buffers; i++)
         vaDestroyBuffer(ctx->hwctx->display, pic->param_buffers[i]);
-    for (i = 0; i < pic->nb_slices; i++) {
-        if (pic->slices) {
-            av_freep(&pic->slices[i].priv_data);
+    if (pic->slices) {
+        for (i = 0; i < pic->nb_slices; i++)
             av_freep(&pic->slices[i].codec_slice_params);
-        }
     }
 fail_at_end:
     av_freep(&pic->codec_picture_params);
@@ -742,11 +740,9 @@ static int vaapi_encode_free(AVCodecContext *avctx,
     if (pic->encode_issued)
         vaapi_encode_discard(avctx, pic);
 
-    for (i = 0; i < pic->nb_slices; i++) {
-        if (pic->slices) {
-            av_freep(&pic->slices[i].priv_data);
+    if (pic->slices) {
+        for (i = 0; i < pic->nb_slices; i++)
             av_freep(&pic->slices[i].codec_slice_params);
-        }
     }
     av_freep(&pic->codec_picture_params);
 
diff --git a/libavcodec/vaapi_encode.h b/libavcodec/vaapi_encode.h
index 2d71eb0199..aa2a45bca6 100644
--- a/libavcodec/vaapi_encode.h
+++ b/libavcodec/vaapi_encode.h
@@ -64,7 +64,6 @@ typedef struct VAAPIEncodeSlice {
     int             row_size;
     int             block_start;
     int             block_size;
-    void           *priv_data;
     void           *codec_slice_params;
 } VAAPIEncodeSlice;
 



More information about the ffmpeg-cvslog mailing list