| @@ -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; |