Showing the changes to libavcodec/vaapi_encode.c (1 of 2 files). Show all
Unified · Split
| @@ -607,11 +607,9 @@ fail_with_picture: · 606 unmodified lines | |||
| 607 | fail: | 607 | fail: |
| 608 | for(i = 0; i < pic->nb_param_buffers; i++) | 608 | for(i = 0; i < pic->nb_param_buffers; i++) |
| 609 | vaDestroyBuffer(ctx->hwctx->display, pic->param_buffers[i]); | 609 | vaDestroyBuffer(ctx->hwctx->display, pic->param_buffers[i]); |
| 610 | for (i = 0; i < pic->nb_slices; i++) { | 610 | if (pic->slices) { |
| 611 | if (pic->slices) { | 611 | for (i = 0; i < pic->nb_slices; i++) |
| 612 | av_freep(&pic->slices[i].priv_data); | ||
| 613 | av_freep(&pic->slices[i].codec_slice_params); | 612 | av_freep(&pic->slices[i].codec_slice_params); |
| 614 | } | ||
| 615 | } | 613 | } |
| 616 | fail_at_end: | 614 | fail_at_end: |
| 617 | av_freep(&pic->codec_picture_params); | 615 | av_freep(&pic->codec_picture_params); |
| @@ -742,11 +740,9 @@ static int vaapi_encode_free(AVCodecContext *avctx, · 124 unmodified lines | |||
| 742 | if (pic->encode_issued) | 740 | if (pic->encode_issued) |
| 743 | vaapi_encode_discard(avctx, pic); | 741 | vaapi_encode_discard(avctx, pic); |
| 744 | 742 | ||
| 745 | for (i = 0; i < pic->nb_slices; i++) { | 743 | if (pic->slices) { |
| 746 | if (pic->slices) { | 744 | for (i = 0; i < pic->nb_slices; i++) |
| 747 | av_freep(&pic->slices[i].priv_data); | ||
| 748 | av_freep(&pic->slices[i].codec_slice_params); | 745 | av_freep(&pic->slices[i].codec_slice_params); |
| 749 | } | ||
| 750 | } | 746 | } |
| 751 | av_freep(&pic->codec_picture_params); | 747 | av_freep(&pic->codec_picture_params); |
| 752 | 748 | ||