MCPcopy Create free account
hub / github.com/byhook/ffmpeg4android / init_output_bsfs

Function init_output_bsfs

ffmpeg-single-cmd/src/main/cpp/ffmpeg_mod.c:2987–3021  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2985}
2986
2987static int init_output_bsfs(OutputStream *ost)
2988{
2989 AVBSFContext *ctx;
2990 int i, ret;
2991
2992 if (!ost->nb_bitstream_filters)
2993 return 0;
2994
2995 for (i = 0; i < ost->nb_bitstream_filters; i++) {
2996 ctx = ost->bsf_ctx[i];
2997
2998 ret = avcodec_parameters_copy(ctx->par_in,
2999 i ? ost->bsf_ctx[i - 1]->par_out : ost->st->codecpar);
3000 if (ret < 0)
3001 return ret;
3002
3003 ctx->time_base_in = i ? ost->bsf_ctx[i - 1]->time_base_out : ost->st->time_base;
3004
3005 ret = av_bsf_init(ctx);
3006 if (ret < 0) {
3007 av_log(NULL, AV_LOG_ERROR, "Error initializing bitstream filter: %s\n",
3008 ost->bsf_ctx[i]->filter->name);
3009 return ret;
3010 }
3011 }
3012
3013 ctx = ost->bsf_ctx[ost->nb_bitstream_filters - 1];
3014 ret = avcodec_parameters_copy(ost->st->codecpar, ctx->par_out);
3015 if (ret < 0)
3016 return ret;
3017
3018 ost->st->time_base = ctx->time_base_out;
3019
3020 return 0;
3021}
3022
3023static int init_output_stream_streamcopy(OutputStream *ost)
3024{

Callers 1

init_output_streamFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected