MCPcopy Create free account
hub / github.com/FFmpeg/FFmpeg / bsf_list_append_internal

Function bsf_list_append_internal

libavcodec/bsf.c:443–482  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

441}
442
443static int bsf_list_append_internal(AVBSFList *lst, const char *bsf_name, const char *options, AVDictionary ** options_dict)
444{
445 int ret;
446 const AVBitStreamFilter *filter;
447 AVBSFContext *bsf;
448
449 filter = av_bsf_get_by_name(bsf_name);
450 if (!filter)
451 return AVERROR_BSF_NOT_FOUND;
452
453 ret = av_bsf_alloc(filter, &bsf);
454 if (ret < 0)
455 return ret;
456
457 if (options && filter->priv_class) {
458 const AVOption *opt = av_opt_next(bsf->priv_data, NULL);
459 const char * shorthand[2] = {NULL};
460
461 if (opt)
462 shorthand[0] = opt->name;
463
464 ret = av_opt_set_from_string(bsf->priv_data, options, shorthand, "=", ":");
465 if (ret < 0)
466 goto end;
467 }
468
469 if (options_dict) {
470 ret = av_opt_set_dict2(bsf, options_dict, AV_OPT_SEARCH_CHILDREN);
471 if (ret < 0)
472 goto end;
473 }
474
475 ret = av_bsf_list_append(lst, bsf);
476
477end:
478 if (ret < 0)
479 av_bsf_free(&bsf);
480
481 return ret;
482}
483
484int av_bsf_list_append2(AVBSFList *lst, const char *bsf_name, AVDictionary ** options)
485{

Callers 2

av_bsf_list_append2Function · 0.85
bsf_parse_singleFunction · 0.85

Calls 7

av_bsf_get_by_nameFunction · 0.85
av_bsf_allocFunction · 0.85
av_opt_nextFunction · 0.85
av_opt_set_from_stringFunction · 0.85
av_opt_set_dict2Function · 0.85
av_bsf_list_appendFunction · 0.85
av_bsf_freeFunction · 0.85

Tested by

no test coverage detected