Showing the changes to libavcodec (2 of 2 files). Show all
Unified · Split
| @@ -84,19 +84,19 @@ int ff_vaapi_decode_make_slice_buffer(AVCodecContext *avctx, · 83 unmodified lines | ||
| 84 | 84 | VAStatus vas; |
| 85 | 85 | int index; |
| 86 | 86 | |
| 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) { | |
| 89 | 89 | VABufferID *tmp = |
| 90 | 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 | 92 | 2 * sizeof(*pic->slice_buffers)); |
| 93 | 93 | if (!tmp) |
| 94 | 94 | return AVERROR(ENOMEM); |
| 95 | 95 | |
| 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; | |
| 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 | 101 | index = 2 * pic->nb_slices; |
| 102 | 102 | |
| @@ -237,8 +237,8 @@ exit: · 134 unmodified lines | ||
| 237 | 237 | pic->nb_param_buffers = 0; |
| 238 | 238 | pic->nb_param_buffers_allocated = 0; |
| 239 | 239 | 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; | |
| 242 | 242 | av_freep(&pic->slice_buffers); |
| 243 | 243 | |
| 244 | 244 | return err; |
| @@ -252,8 +252,8 @@ int ff_vaapi_decode_cancel(AVCodecContext *avctx, · 7 unmodified lines | ||
| 252 | 252 | pic->nb_param_buffers = 0; |
| 253 | 253 | pic->nb_param_buffers_allocated = 0; |
| 254 | 254 | 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; | |
| 257 | 257 | av_freep(&pic->slice_buffers); |
| 258 | 258 | |
| 259 | 259 | return 0; |
| @@ -41,7 +41,7 @@ typedef struct VAAPIDecodePicture { · 40 unmodified lines | ||
| 41 | 41 | |
| 42 | 42 | int nb_slices; |
| 43 | 43 | VABufferID *slice_buffers; |
| 44 | − int slices_allocated; | |
| 44 | + int nb_slice_buffers_allocated; | |
| 45 | 45 | } VAAPIDecodePicture; |
| 46 | 46 | |
| 47 | 47 | typedef struct VAAPIDecodeContext { |