History

lavc/vaapi_decode: Use a more meaningful variable name

Fei Wang committed 2 years ago

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

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
8484 VAStatus vas;
8585 int index;
8686
87− av_assert0(pic->nb_slices <= pic->slices_allocated);
88− if (pic->nb_slices == pic->slices_allocated) {
87+ av_assert0(pic->nb_slices <= pic->nb_slice_buffers_allocated);
88+ if (pic->nb_slices == pic->nb_slice_buffers_allocated) {
8989 VABufferID *tmp =
9090 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,
9292 2 * sizeof(*pic->slice_buffers));
9393 if (!tmp)
9494 return AVERROR(ENOMEM);
9595
96− pic->slice_buffers = tmp;
97− pic->slices_allocated = pic->slices_allocated ? pic->slices_allocated * 2 : 64;
96+ pic->slice_buffers = tmp;
97+ pic->nb_slice_buffers_allocated = pic->nb_slice_buffers_allocated ? pic->nb_slice_buffers_allocated * 2 : 64;
9898 }
99− av_assert0(pic->nb_slices + 1 <= pic->slices_allocated);
99+ av_assert0(pic->nb_slices + 1 <= pic->nb_slice_buffers_allocated);
100100
101101 index = 2 * pic->nb_slices;
102102
@@ -237,8 +237,8 @@ exit: · 134 unmodified lines
237237 pic->nb_param_buffers = 0;
238238 pic->nb_param_buffers_allocated = 0;
239239 av_freep(&pic->param_buffers);
240− pic->nb_slices = 0;
241− pic->slices_allocated = 0;
240+ pic->nb_slices = 0;
241+ pic->nb_slice_buffers_allocated = 0;
242242 av_freep(&pic->slice_buffers);
243243
244244 return err;
@@ -252,8 +252,8 @@ int ff_vaapi_decode_cancel(AVCodecContext *avctx, · 7 unmodified lines
252252 pic->nb_param_buffers = 0;
253253 pic->nb_param_buffers_allocated = 0;
254254 av_freep(&pic->param_buffers);
255− pic->nb_slices = 0;
256− pic->slices_allocated = 0;
255+ pic->nb_slices = 0;
256+ pic->nb_slice_buffers_allocated = 0;
257257 av_freep(&pic->slice_buffers);
258258
259259 return 0;
libavcodec/vaapi_decode.h+1−1
@@ -41,7 +41,7 @@ typedef struct VAAPIDecodePicture { · 40 unmodified lines
4141
4242 int nb_slices;
4343 VABufferID *slice_buffers;
44− int slices_allocated;
44+ int nb_slice_buffers_allocated;
4545 } VAAPIDecodePicture;
4646
4747 typedef 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