static int parse_bsfs(void *log_ctx, const char *bsfs_spec,

                      AVBitStreamFilterContext **bsfs)

{

    char *bsf_name, *buf, *saveptr;

    int ret = 0;



    if (!(buf = av_strdup(bsfs_spec)))

        return AVERROR(ENOMEM);



    while (bsf_name = av_strtok(buf, ",", &saveptr)) {

        AVBitStreamFilterContext *bsf = av_bitstream_filter_init(bsf_name);



        if (!bsf) {

            av_log(log_ctx, AV_LOG_ERROR,

                   "Cannot initialize bitstream filter with name '%s', "

                   "unknown filter or internal error happened\n",

                   bsf_name);

            ret = AVERROR_UNKNOWN;

            goto end;

        }



        /* append bsf context to the list of bsf contexts */

        *bsfs = bsf;

        bsfs = &bsf->next;



        buf = NULL;

    }



end:

    av_free(buf);

    return ret;

}

static int parse_bsfs(void *log_ctx, const char *bsfs_spec,

                      AVBitStreamFilterContext **bsfs)

{

    char *bsf_name, *buf, *saveptr;

    int ret = 0;



    if (!(buf = av_strdup(bsfs_spec)))

        return AVERROR(ENOMEM);



    while (bsf_name = av_strtok(buf, ",", &saveptr)) {

        AVBitStreamFilterContext *bsf = av_bitstream_filter_init(bsf_name);



        if (!bsf) {

            av_log(log_ctx, AV_LOG_ERROR,

                   "Cannot initialize bitstream filter with name '%s', "

                   "unknown filter or internal error happened\n",

                   bsf_name);

            ret = AVERROR_UNKNOWN;

            goto end;

        }



        

        *bsfs = bsf;

        bsfs = &bsf->next;



        buf = NULL;

    }



end:

    av_free(buf);

    return ret;

}

    char *bsf_name, *buf, *saveptr;     if (!(buf = av_strdup(bsfs_spec)))     av_free(buf);
static int FUNC_0(void *VAR_0, const char *VAR_1,

                      AVBitStreamFilterContext **VAR_2)

{

    char *VAR_3, *VAR_4, *VAR_5;

    int VAR_6 = 0;



    if (!(VAR_4 = av_strdup(VAR_1)))

        return AVERROR(ENOMEM);



    while (VAR_3 = av_strtok(VAR_4, ",", &VAR_5)) {

        AVBitStreamFilterContext *bsf = av_bitstream_filter_init(VAR_3);



        if (!bsf) {

            av_log(VAR_0, AV_LOG_ERROR,

                   "Cannot initialize bitstream filter with name '%s', "

                   "unknown filter or internal error happened\n",

                   VAR_3);

            VAR_6 = AVERROR_UNKNOWN;

            goto end;

        }



        

        *VAR_2 = bsf;

        VAR_2 = &bsf->next;



        VAR_4 = NULL;

    }



end:

    av_free(VAR_4);

    return VAR_6;

}

static int FUNC_0(void *VAR_0, const char *VAR_1,
AVBitStreamFilterContext **VAR_2)
{ char *VAR_3, *VAR_4, *VAR_5; int VAR_6 = 0; if (!(VAR_4 = av_strdup(VAR_1)))
return AVERROR(ENOMEM); while (VAR_3 = av_strtok(VAR_4, ",", &VAR_5)) { AVBitStreamFilterContext *bsf = av_bitstream_filter_init(VAR_3); if (!bsf) { av_log(VAR_0, AV_LOG_ERROR,
"Cannot initialize bitstream filter with name '%s', "
"unknown filter or internal error happened\n",
VAR_3); VAR_6 = AVERROR_UNKNOWN; goto end; } *VAR_2 = bsf; VAR_2 = &bsf->next; VAR_4 = NULL; } end:
av_free(VAR_4); return VAR_6; }