History

lavc/vaapi_decode: Use a more meaningful variable name

Fei Wang committed 2 years ago

Commit f42978f1 parent 1d8c31d2 files · +11 −11Browse files

Showing the changes to libavcodec (2 of 2 files). Show all

Unified · Split

2 files
  1. libavcodec/vaapi_decode.c +10 −10
  2. libavcodec/vaapi_decode.h +1 −1
libavcodec/vaapi_decode.c+10−10
@@ -84,19 +84,19 @@ int ff_vaapi_decode_make_slice_buffer(AVCodecContext *avctx, · 83 unmodified lines
84 VAStatus vas;84 VAStatus vas;
85 int index;85 int index;
86 86
87 av_assert0(pic->nb_slices <= pic->slices_allocated);87 av_assert0(pic->nb_slices <= pic->nb_slice_buffers_allocated);
88 if (pic->nb_slices == pic->slices_allocated) {88 if (pic->nb_slices == pic->nb_slice_buffers_allocated) {
89 VABufferID *tmp =89 VABufferID *tmp =
90 av_realloc_array(pic->slice_buffers,90 av_realloc_array(pic->slice_buffers,
91 pic->slices_allocated ? pic->slices_allocated * 2 : 64,91 pic->nb_slice_buffers_allocated ? pic->nb_slice_buffers_allocated * 2 : 64,
92 2 * sizeof(*pic->slice_buffers));92 2 * sizeof(*pic->slice_buffers));
93 if (!tmp)93 if (!tmp)
94 return AVERROR(ENOMEM);94 return AVERROR(ENOMEM);
95 95
96 pic->slice_buffers = tmp;96 pic->slice_buffers = tmp;
97 pic->slices_allocated = pic->slices_allocated ? pic->slices_allocated * 2 : 64;97 pic->nb_slice_buffers_allocated = pic->nb_slice_buffers_allocated ? pic->nb_slice_buffers_allocated * 2 : 64;
98 }98 }
99 av_assert0(pic->nb_slices + 1 <= pic->slices_allocated);99 av_assert0(pic->nb_slices + 1 <= pic->nb_slice_buffers_allocated);
100 100
101 index = 2 * pic->nb_slices;101 index = 2 * pic->nb_slices;
102 102
@@ -237,8 +237,8 @@ exit: · 134 unmodified lines
237 pic->nb_param_buffers = 0;237 pic->nb_param_buffers = 0;
238 pic->nb_param_buffers_allocated = 0;238 pic->nb_param_buffers_allocated = 0;
239 av_freep(&pic->param_buffers);239 av_freep(&pic->param_buffers);
240 pic->nb_slices = 0;240 pic->nb_slices = 0;
241 pic->slices_allocated = 0;241 pic->nb_slice_buffers_allocated = 0;
242 av_freep(&pic->slice_buffers);242 av_freep(&pic->slice_buffers);
243 243
244 return err;244 return err;
@@ -252,8 +252,8 @@ int ff_vaapi_decode_cancel(AVCodecContext *avctx, · 7 unmodified lines
252 pic->nb_param_buffers = 0;252 pic->nb_param_buffers = 0;
253 pic->nb_param_buffers_allocated = 0;253 pic->nb_param_buffers_allocated = 0;
254 av_freep(&pic->param_buffers);254 av_freep(&pic->param_buffers);
255 pic->nb_slices = 0;255 pic->nb_slices = 0;
256 pic->slices_allocated = 0;256 pic->nb_slice_buffers_allocated = 0;
257 av_freep(&pic->slice_buffers);257 av_freep(&pic->slice_buffers);
258 258
259 return 0;259 return 0;
libavcodec/vaapi_decode.h+1−1
@@ -41,7 +41,7 @@ typedef struct VAAPIDecodePicture { · 40 unmodified lines
41 41
42 int nb_slices;42 int nb_slices;
43 VABufferID *slice_buffers;43 VABufferID *slice_buffers;
44 int slices_allocated;44 int nb_slice_buffers_allocated;
45} VAAPIDecodePicture;45} VAAPIDecodePicture;
46 46
47typedef struct VAAPIDecodeContext {47typedef struct VAAPIDecodeContext {

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t