Several cbs-functions had an unused CodedBitstreamContext parameter. This commit removes these.
Showing the changes to libavcodec/vaapi_encode_mpeg2.c (1 of 23 files). Show all
Unified · Split
| @@ -93,10 +93,9 @@ static int vaapi_encode_mpeg2_add_header(AVCodecContext *avctx, · 92 unmodified lines | ||
| 93 | 93 | CodedBitstreamFragment *frag, |
| 94 | 94 | int type, void *header) |
| 95 | 95 | { |
| 96 | − VAAPIEncodeMPEG2Context *priv = avctx->priv_data; | |
| 97 | 96 | int err; |
| 98 | 97 | |
| 99 | − err = ff_cbs_insert_unit_content(priv->cbc, frag, -1, type, header, NULL); | |
| 98 | + err = ff_cbs_insert_unit_content(frag, -1, type, header, NULL); | |
| 100 | 99 | if (err < 0) { |
| 101 | 100 | av_log(avctx, AV_LOG_ERROR, "Failed to add header: " |
| 102 | 101 | "type = %d.\n", type); |
| @@ -135,7 +134,7 @@ static int vaapi_encode_mpeg2_write_sequence_header(AVCodecContext *avctx, · 32 unmodified lines | ||
| 135 | 134 | |
| 136 | 135 | err = vaapi_encode_mpeg2_write_fragment(avctx, data, data_len, frag); |
| 137 | 136 | fail: |
| 138 | − ff_cbs_fragment_reset(priv->cbc, frag); | |
| 137 | + ff_cbs_fragment_reset(frag); | |
| 139 | 138 | return 0; |
| 140 | 139 | } |
| 141 | 140 | |
| @@ -159,7 +158,7 @@ static int vaapi_encode_mpeg2_write_picture_header(AVCodecContext *avctx, · 17 unmodified lines | ||
| 159 | 158 | |
| 160 | 159 | err = vaapi_encode_mpeg2_write_fragment(avctx, data, data_len, frag); |
| 161 | 160 | fail: |
| 162 | − ff_cbs_fragment_reset(priv->cbc, frag); | |
| 161 | + ff_cbs_fragment_reset(frag); | |
| 163 | 162 | return 0; |
| 164 | 163 | } |
| 165 | 164 | |
| @@ -633,7 +632,7 @@ static av_cold int vaapi_encode_mpeg2_close(AVCodecContext *avctx) · 467 unmodified lines | ||
| 633 | 632 | { |
| 634 | 633 | VAAPIEncodeMPEG2Context *priv = avctx->priv_data; |
| 635 | 634 | |
| 636 | − ff_cbs_fragment_free(priv->cbc, &priv->current_fragment); | |
| 635 | + ff_cbs_fragment_free(&priv->current_fragment); | |
| 637 | 636 | ff_cbs_close(&priv->cbc); |
| 638 | 637 | |
| 639 | 638 | return ff_vaapi_encode_close(avctx); |