- if (bsf->par_in->extradata) {
- err = ff_cbs_read_extradata(ctx->input, au, bsf->par_in);
- if (err < 0) {
- av_log(bsf, AV_LOG_ERROR, "Failed to read extradata.\n");
- return err;
- }
-
- for (i = 0; i < au->nb_units; i++) {
- if (au->units[i].type == H264_NAL_PPS)
- h264_redundant_pps_fixup_pps(ctx, au->units[i].content);
- }
-
- err = ff_cbs_write_extradata(ctx->output, bsf->par_out, au);
- if (err < 0) {
- av_log(bsf, AV_LOG_ERROR, "Failed to write extradata.\n");
- return err;
- }
-
- ff_cbs_fragment_uninit(ctx->output, au);
- }
-
- return 0;
-}
-
-static void h264_redundant_pps_close(AVBSFContext *bsf)
-{
- H264RedundantPPSContext *ctx = bsf->priv_data;
- ff_cbs_close(&ctx->input);
- ff_cbs_close(&ctx->output);