static int ffserver_apply_stream_config(AVCodecContext *enc, const AVDictionary *conf, AVDictionary **opts)

{

    AVDictionaryEntry *e;

    int ret = 0;



    /* Return values from ffserver_set_*_param are ignored.

       Values are initially parsed and checked before inserting to AVDictionary. */



    //video params

    if ((e = av_dict_get(conf, "VideoBitRateRangeMin", NULL, 0)))

        ffserver_set_int_param(&enc->rc_min_rate, e->value, 1000, INT_MIN, INT_MAX, NULL, 0, NULL);

    if ((e = av_dict_get(conf, "VideoBitRateRangeMax", NULL, 0)))

        ffserver_set_int_param(&enc->rc_max_rate, e->value, 1000, INT_MIN, INT_MAX, NULL, 0, NULL);

    if ((e = av_dict_get(conf, "Debug", NULL, 0)))

        ffserver_set_int_param(&enc->debug, e->value, 0, INT_MIN, INT_MAX, NULL, 0, NULL);

    if ((e = av_dict_get(conf, "Strict", NULL, 0)))

        ffserver_set_int_param(&enc->strict_std_compliance, e->value, 0, INT_MIN, INT_MAX, NULL, 0, NULL);

    if ((e = av_dict_get(conf, "VideoBufferSize", NULL, 0)))

        ffserver_set_int_param(&enc->rc_buffer_size, e->value, 8*1024, INT_MIN, INT_MAX, NULL, 0, NULL);

    if ((e = av_dict_get(conf, "VideoBitRateTolerance", NULL, 0)))

        ffserver_set_int_param(&enc->bit_rate_tolerance, e->value, 1000, INT_MIN, INT_MAX, NULL, 0, NULL);

    if ((e = av_dict_get(conf, "VideoBitRate", NULL, 0)))

        ffserver_set_int_param(&enc->bit_rate, e->value, 1000, INT_MIN, INT_MAX, NULL, 0, NULL);

    if ((e = av_dict_get(conf, "VideoSizeWidth", NULL, 0)))

        ffserver_set_int_param(&enc->width, e->value, 0, INT_MIN, INT_MAX, NULL, 0, NULL);

    if ((e = av_dict_get(conf, "VideoSizeHeight", NULL, 0)))

        ffserver_set_int_param(&enc->height, e->value, 0, INT_MIN, INT_MAX, NULL, 0, NULL);

    if ((e = av_dict_get(conf, "PixelFormat", NULL, 0))) {

        int val;

        ffserver_set_int_param(&val, e->value, 0, INT_MIN, INT_MAX, NULL, 0, NULL);

        enc->pix_fmt = val;

    }

    if ((e = av_dict_get(conf, "VideoGopSize", NULL, 0)))

        ffserver_set_int_param(&enc->gop_size, e->value, 0, INT_MIN, INT_MAX, NULL, 0, NULL);

    if ((e = av_dict_get(conf, "VideoFrameRateNum", NULL, 0)))

        ffserver_set_int_param(&enc->time_base.num, e->value, 0, INT_MIN, INT_MAX, NULL, 0, NULL);

    if ((e = av_dict_get(conf, "VideoFrameRateDen", NULL, 0)))

        ffserver_set_int_param(&enc->time_base.den, e->value, 0, INT_MIN, INT_MAX, NULL, 0, NULL);

    if ((e = av_dict_get(conf, "VideoQDiff", NULL, 0)))

        ffserver_set_int_param(&enc->max_qdiff, e->value, 0, INT_MIN, INT_MAX, NULL, 0, NULL);

    if ((e = av_dict_get(conf, "VideoQMax", NULL, 0)))

        ffserver_set_int_param(&enc->qmax, e->value, 0, INT_MIN, INT_MAX, NULL, 0, NULL);

    if ((e = av_dict_get(conf, "VideoQMin", NULL, 0)))

        ffserver_set_int_param(&enc->qmin, e->value, 0, INT_MIN, INT_MAX, NULL, 0, NULL);

    if ((e = av_dict_get(conf, "LumiMask", NULL, 0)))

        ffserver_set_float_param(&enc->lumi_masking, e->value, 0, -FLT_MAX, FLT_MAX, NULL, 0, NULL);

    if ((e = av_dict_get(conf, "DarkMask", NULL, 0)))

        ffserver_set_float_param(&enc->dark_masking, e->value, 0, -FLT_MAX, FLT_MAX, NULL, 0, NULL);

    if (av_dict_get(conf, "BitExact", NULL, 0))

        enc->flags |= CODEC_FLAG_BITEXACT;

    if (av_dict_get(conf, "DctFastint", NULL, 0))

        enc->dct_algo  = FF_DCT_FASTINT;

    if (av_dict_get(conf, "IdctSimple", NULL, 0))

        enc->idct_algo = FF_IDCT_SIMPLE;

    if (av_dict_get(conf, "VideoHighQuality", NULL, 0))

        enc->mb_decision = FF_MB_DECISION_BITS;

    if ((e = av_dict_get(conf, "VideoTag", NULL, 0)))

        enc->codec_tag = MKTAG(e->value[0], e->value[1], e->value[2], e->value[3]);

    if (av_dict_get(conf, "Qscale", NULL, 0)) {

        enc->flags |= CODEC_FLAG_QSCALE;

        ffserver_set_int_param(&enc->global_quality, e->value, FF_QP2LAMBDA, INT_MIN, INT_MAX, NULL, 0, NULL);

    }

    if (av_dict_get(conf, "Video4MotionVector", NULL, 0)) {

        enc->mb_decision = FF_MB_DECISION_BITS; //FIXME remove

        enc->flags |= CODEC_FLAG_4MV;

    }

    //audio params

    if ((e = av_dict_get(conf, "AudioChannels", NULL, 0)))

        ffserver_set_int_param(&enc->channels, e->value, 0, INT_MIN, INT_MAX, NULL, 0, NULL);

    if ((e = av_dict_get(conf, "AudioSampleRate", NULL, 0)))

        ffserver_set_int_param(&enc->sample_rate, e->value, 0, INT_MIN, INT_MAX, NULL, 0, NULL);

    if ((e = av_dict_get(conf, "AudioBitRate", NULL, 0)))

        ffserver_set_int_param(&enc->bit_rate, e->value, 0, INT_MIN, INT_MAX, NULL, 0, NULL);



    av_opt_set_dict2(enc, opts, AV_OPT_SEARCH_CHILDREN);

    e = NULL;

    while (e = av_dict_get(*opts, "", e, AV_DICT_IGNORE_SUFFIX)) {

        av_log(NULL, AV_LOG_ERROR, "Provided AVOption '%s' doesn't match any existing option.\n", e->key);

        ret = AVERROR(EINVAL);

    }



    return ret;

}

static int ffserver_apply_stream_config(AVCodecContext *enc, const AVDictionary *conf, AVDictionary **opts)

{

    AVDictionaryEntry *e;

    int ret = 0;



    





    

    if ((e = av_dict_get(conf, "VideoBitRateRangeMin", NULL, 0)))

        ffserver_set_int_param(&enc->rc_min_rate, e->value, 1000, INT_MIN, INT_MAX, NULL, 0, NULL);

    if ((e = av_dict_get(conf, "VideoBitRateRangeMax", NULL, 0)))

        ffserver_set_int_param(&enc->rc_max_rate, e->value, 1000, INT_MIN, INT_MAX, NULL, 0, NULL);

    if ((e = av_dict_get(conf, "Debug", NULL, 0)))

        ffserver_set_int_param(&enc->debug, e->value, 0, INT_MIN, INT_MAX, NULL, 0, NULL);

    if ((e = av_dict_get(conf, "Strict", NULL, 0)))

        ffserver_set_int_param(&enc->strict_std_compliance, e->value, 0, INT_MIN, INT_MAX, NULL, 0, NULL);

    if ((e = av_dict_get(conf, "VideoBufferSize", NULL, 0)))

        ffserver_set_int_param(&enc->rc_buffer_size, e->value, 8*1024, INT_MIN, INT_MAX, NULL, 0, NULL);

    if ((e = av_dict_get(conf, "VideoBitRateTolerance", NULL, 0)))

        ffserver_set_int_param(&enc->bit_rate_tolerance, e->value, 1000, INT_MIN, INT_MAX, NULL, 0, NULL);

    if ((e = av_dict_get(conf, "VideoBitRate", NULL, 0)))

        ffserver_set_int_param(&enc->bit_rate, e->value, 1000, INT_MIN, INT_MAX, NULL, 0, NULL);

    if ((e = av_dict_get(conf, "VideoSizeWidth", NULL, 0)))

        ffserver_set_int_param(&enc->width, e->value, 0, INT_MIN, INT_MAX, NULL, 0, NULL);

    if ((e = av_dict_get(conf, "VideoSizeHeight", NULL, 0)))

        ffserver_set_int_param(&enc->height, e->value, 0, INT_MIN, INT_MAX, NULL, 0, NULL);

    if ((e = av_dict_get(conf, "PixelFormat", NULL, 0))) {

        int val;

        ffserver_set_int_param(&val, e->value, 0, INT_MIN, INT_MAX, NULL, 0, NULL);

        enc->pix_fmt = val;

    }

    if ((e = av_dict_get(conf, "VideoGopSize", NULL, 0)))

        ffserver_set_int_param(&enc->gop_size, e->value, 0, INT_MIN, INT_MAX, NULL, 0, NULL);

    if ((e = av_dict_get(conf, "VideoFrameRateNum", NULL, 0)))

        ffserver_set_int_param(&enc->time_base.num, e->value, 0, INT_MIN, INT_MAX, NULL, 0, NULL);

    if ((e = av_dict_get(conf, "VideoFrameRateDen", NULL, 0)))

        ffserver_set_int_param(&enc->time_base.den, e->value, 0, INT_MIN, INT_MAX, NULL, 0, NULL);

    if ((e = av_dict_get(conf, "VideoQDiff", NULL, 0)))

        ffserver_set_int_param(&enc->max_qdiff, e->value, 0, INT_MIN, INT_MAX, NULL, 0, NULL);

    if ((e = av_dict_get(conf, "VideoQMax", NULL, 0)))

        ffserver_set_int_param(&enc->qmax, e->value, 0, INT_MIN, INT_MAX, NULL, 0, NULL);

    if ((e = av_dict_get(conf, "VideoQMin", NULL, 0)))

        ffserver_set_int_param(&enc->qmin, e->value, 0, INT_MIN, INT_MAX, NULL, 0, NULL);

    if ((e = av_dict_get(conf, "LumiMask", NULL, 0)))

        ffserver_set_float_param(&enc->lumi_masking, e->value, 0, -FLT_MAX, FLT_MAX, NULL, 0, NULL);

    if ((e = av_dict_get(conf, "DarkMask", NULL, 0)))

        ffserver_set_float_param(&enc->dark_masking, e->value, 0, -FLT_MAX, FLT_MAX, NULL, 0, NULL);

    if (av_dict_get(conf, "BitExact", NULL, 0))

        enc->flags |= CODEC_FLAG_BITEXACT;

    if (av_dict_get(conf, "DctFastint", NULL, 0))

        enc->dct_algo  = FF_DCT_FASTINT;

    if (av_dict_get(conf, "IdctSimple", NULL, 0))

        enc->idct_algo = FF_IDCT_SIMPLE;

    if (av_dict_get(conf, "VideoHighQuality", NULL, 0))

        enc->mb_decision = FF_MB_DECISION_BITS;

    if ((e = av_dict_get(conf, "VideoTag", NULL, 0)))

        enc->codec_tag = MKTAG(e->value[0], e->value[1], e->value[2], e->value[3]);

    if (av_dict_get(conf, "Qscale", NULL, 0)) {

        enc->flags |= CODEC_FLAG_QSCALE;

        ffserver_set_int_param(&enc->global_quality, e->value, FF_QP2LAMBDA, INT_MIN, INT_MAX, NULL, 0, NULL);

    }

    if (av_dict_get(conf, "Video4MotionVector", NULL, 0)) {

        enc->mb_decision = FF_MB_DECISION_BITS; 

        enc->flags |= CODEC_FLAG_4MV;

    }

    

    if ((e = av_dict_get(conf, "AudioChannels", NULL, 0)))

        ffserver_set_int_param(&enc->channels, e->value, 0, INT_MIN, INT_MAX, NULL, 0, NULL);

    if ((e = av_dict_get(conf, "AudioSampleRate", NULL, 0)))

        ffserver_set_int_param(&enc->sample_rate, e->value, 0, INT_MIN, INT_MAX, NULL, 0, NULL);

    if ((e = av_dict_get(conf, "AudioBitRate", NULL, 0)))

        ffserver_set_int_param(&enc->bit_rate, e->value, 0, INT_MIN, INT_MAX, NULL, 0, NULL);



    av_opt_set_dict2(enc, opts, AV_OPT_SEARCH_CHILDREN);

    e = NULL;

    while (e = av_dict_get(*opts, "", e, AV_DICT_IGNORE_SUFFIX)) {

        av_log(NULL, AV_LOG_ERROR, "Provided AVOption '%s' doesn't match any existing option.\n", e->key);

        ret = AVERROR(EINVAL);

    }



    return ret;

}

static int FUNC_0(AVCodecContext *VAR_0, const AVDictionary *VAR_1, AVDictionary **VAR_2)

{

    AVDictionaryEntry *e;

    int VAR_3 = 0;



    





    

    if ((e = av_dict_get(VAR_1, "VideoBitRateRangeMin", NULL, 0)))

        ffserver_set_int_param(&VAR_0->rc_min_rate, e->value, 1000, INT_MIN, INT_MAX, NULL, 0, NULL);

    if ((e = av_dict_get(VAR_1, "VideoBitRateRangeMax", NULL, 0)))

        ffserver_set_int_param(&VAR_0->rc_max_rate, e->value, 1000, INT_MIN, INT_MAX, NULL, 0, NULL);

    if ((e = av_dict_get(VAR_1, "Debug", NULL, 0)))

        ffserver_set_int_param(&VAR_0->debug, e->value, 0, INT_MIN, INT_MAX, NULL, 0, NULL);

    if ((e = av_dict_get(VAR_1, "Strict", NULL, 0)))

        ffserver_set_int_param(&VAR_0->strict_std_compliance, e->value, 0, INT_MIN, INT_MAX, NULL, 0, NULL);

    if ((e = av_dict_get(VAR_1, "VideoBufferSize", NULL, 0)))

        ffserver_set_int_param(&VAR_0->rc_buffer_size, e->value, 8*1024, INT_MIN, INT_MAX, NULL, 0, NULL);

    if ((e = av_dict_get(VAR_1, "VideoBitRateTolerance", NULL, 0)))

        ffserver_set_int_param(&VAR_0->bit_rate_tolerance, e->value, 1000, INT_MIN, INT_MAX, NULL, 0, NULL);

    if ((e = av_dict_get(VAR_1, "VideoBitRate", NULL, 0)))

        ffserver_set_int_param(&VAR_0->bit_rate, e->value, 1000, INT_MIN, INT_MAX, NULL, 0, NULL);

    if ((e = av_dict_get(VAR_1, "VideoSizeWidth", NULL, 0)))

        ffserver_set_int_param(&VAR_0->width, e->value, 0, INT_MIN, INT_MAX, NULL, 0, NULL);

    if ((e = av_dict_get(VAR_1, "VideoSizeHeight", NULL, 0)))

        ffserver_set_int_param(&VAR_0->height, e->value, 0, INT_MIN, INT_MAX, NULL, 0, NULL);

    if ((e = av_dict_get(VAR_1, "PixelFormat", NULL, 0))) {

        int VAR_4;

        ffserver_set_int_param(&VAR_4, e->value, 0, INT_MIN, INT_MAX, NULL, 0, NULL);

        VAR_0->pix_fmt = VAR_4;

    }

    if ((e = av_dict_get(VAR_1, "VideoGopSize", NULL, 0)))

        ffserver_set_int_param(&VAR_0->gop_size, e->value, 0, INT_MIN, INT_MAX, NULL, 0, NULL);

    if ((e = av_dict_get(VAR_1, "VideoFrameRateNum", NULL, 0)))

        ffserver_set_int_param(&VAR_0->time_base.num, e->value, 0, INT_MIN, INT_MAX, NULL, 0, NULL);

    if ((e = av_dict_get(VAR_1, "VideoFrameRateDen", NULL, 0)))

        ffserver_set_int_param(&VAR_0->time_base.den, e->value, 0, INT_MIN, INT_MAX, NULL, 0, NULL);

    if ((e = av_dict_get(VAR_1, "VideoQDiff", NULL, 0)))

        ffserver_set_int_param(&VAR_0->max_qdiff, e->value, 0, INT_MIN, INT_MAX, NULL, 0, NULL);

    if ((e = av_dict_get(VAR_1, "VideoQMax", NULL, 0)))

        ffserver_set_int_param(&VAR_0->qmax, e->value, 0, INT_MIN, INT_MAX, NULL, 0, NULL);

    if ((e = av_dict_get(VAR_1, "VideoQMin", NULL, 0)))

        ffserver_set_int_param(&VAR_0->qmin, e->value, 0, INT_MIN, INT_MAX, NULL, 0, NULL);

    if ((e = av_dict_get(VAR_1, "LumiMask", NULL, 0)))

        ffserver_set_float_param(&VAR_0->lumi_masking, e->value, 0, -FLT_MAX, FLT_MAX, NULL, 0, NULL);

    if ((e = av_dict_get(VAR_1, "DarkMask", NULL, 0)))

        ffserver_set_float_param(&VAR_0->dark_masking, e->value, 0, -FLT_MAX, FLT_MAX, NULL, 0, NULL);

    if (av_dict_get(VAR_1, "BitExact", NULL, 0))

        VAR_0->flags |= CODEC_FLAG_BITEXACT;

    if (av_dict_get(VAR_1, "DctFastint", NULL, 0))

        VAR_0->dct_algo  = FF_DCT_FASTINT;

    if (av_dict_get(VAR_1, "IdctSimple", NULL, 0))

        VAR_0->idct_algo = FF_IDCT_SIMPLE;

    if (av_dict_get(VAR_1, "VideoHighQuality", NULL, 0))

        VAR_0->mb_decision = FF_MB_DECISION_BITS;

    if ((e = av_dict_get(VAR_1, "VideoTag", NULL, 0)))

        VAR_0->codec_tag = MKTAG(e->value[0], e->value[1], e->value[2], e->value[3]);

    if (av_dict_get(VAR_1, "Qscale", NULL, 0)) {

        VAR_0->flags |= CODEC_FLAG_QSCALE;

        ffserver_set_int_param(&VAR_0->global_quality, e->value, FF_QP2LAMBDA, INT_MIN, INT_MAX, NULL, 0, NULL);

    }

    if (av_dict_get(VAR_1, "Video4MotionVector", NULL, 0)) {

        VAR_0->mb_decision = FF_MB_DECISION_BITS; 

        VAR_0->flags |= CODEC_FLAG_4MV;

    }

    

    if ((e = av_dict_get(VAR_1, "AudioChannels", NULL, 0)))

        ffserver_set_int_param(&VAR_0->channels, e->value, 0, INT_MIN, INT_MAX, NULL, 0, NULL);

    if ((e = av_dict_get(VAR_1, "AudioSampleRate", NULL, 0)))

        ffserver_set_int_param(&VAR_0->sample_rate, e->value, 0, INT_MIN, INT_MAX, NULL, 0, NULL);

    if ((e = av_dict_get(VAR_1, "AudioBitRate", NULL, 0)))

        ffserver_set_int_param(&VAR_0->bit_rate, e->value, 0, INT_MIN, INT_MAX, NULL, 0, NULL);



    av_opt_set_dict2(VAR_0, VAR_2, AV_OPT_SEARCH_CHILDREN);

    e = NULL;

    while (e = av_dict_get(*VAR_2, "", e, AV_DICT_IGNORE_SUFFIX)) {

        av_log(NULL, AV_LOG_ERROR, "Provided AVOption '%s' doesn't match any existing option.\n", e->key);

        VAR_3 = AVERROR(EINVAL);

    }



    return VAR_3;

}

static int FUNC_0(AVCodecContext *VAR_0, const AVDictionary *VAR_1, AVDictionary **VAR_2)
{ AVDictionaryEntry *e; int VAR_3 = 0; if ((e = av_dict_get(VAR_1, "VideoBitRateRangeMin", NULL, 0)))
ffserver_set_int_param(&VAR_0->rc_min_rate, e->value, 1000, INT_MIN, INT_MAX, NULL, 0, NULL); if ((e = av_dict_get(VAR_1, "VideoBitRateRangeMax", NULL, 0)))
ffserver_set_int_param(&VAR_0->rc_max_rate, e->value, 1000, INT_MIN, INT_MAX, NULL, 0, NULL); if ((e = av_dict_get(VAR_1, "Debug", NULL, 0)))
ffserver_set_int_param(&VAR_0->debug, e->value, 0, INT_MIN, INT_MAX, NULL, 0, NULL); if ((e = av_dict_get(VAR_1, "Strict", NULL, 0)))
ffserver_set_int_param(&VAR_0->strict_std_compliance, e->value, 0, INT_MIN, INT_MAX, NULL, 0, NULL); if ((e = av_dict_get(VAR_1, "VideoBufferSize", NULL, 0)))
ffserver_set_int_param(&VAR_0->rc_buffer_size, e->value, 8*1024, INT_MIN, INT_MAX, NULL, 0, NULL); if ((e = av_dict_get(VAR_1, "VideoBitRateTolerance", NULL, 0)))
ffserver_set_int_param(&VAR_0->bit_rate_tolerance, e->value, 1000, INT_MIN, INT_MAX, NULL, 0, NULL); if ((e = av_dict_get(VAR_1, "VideoBitRate", NULL, 0)))
ffserver_set_int_param(&VAR_0->bit_rate, e->value, 1000, INT_MIN, INT_MAX, NULL, 0, NULL); if ((e = av_dict_get(VAR_1, "VideoSizeWidth", NULL, 0)))
ffserver_set_int_param(&VAR_0->width, e->value, 0, INT_MIN, INT_MAX, NULL, 0, NULL); if ((e = av_dict_get(VAR_1, "VideoSizeHeight", NULL, 0)))
ffserver_set_int_param(&VAR_0->height, e->value, 0, INT_MIN, INT_MAX, NULL, 0, NULL); if ((e = av_dict_get(VAR_1, "PixelFormat", NULL, 0))) { int VAR_4; ffserver_set_int_param(&VAR_4, e->value, 0, INT_MIN, INT_MAX, NULL, 0, NULL); VAR_0->pix_fmt = VAR_4; } if ((e = av_dict_get(VAR_1, "VideoGopSize", NULL, 0)))
ffserver_set_int_param(&VAR_0->gop_size, e->value, 0, INT_MIN, INT_MAX, NULL, 0, NULL); if ((e = av_dict_get(VAR_1, "VideoFrameRateNum", NULL, 0)))
ffserver_set_int_param(&VAR_0->time_base.num, e->value, 0, INT_MIN, INT_MAX, NULL, 0, NULL); if ((e = av_dict_get(VAR_1, "VideoFrameRateDen", NULL, 0)))
ffserver_set_int_param(&VAR_0->time_base.den, e->value, 0, INT_MIN, INT_MAX, NULL, 0, NULL); if ((e = av_dict_get(VAR_1, "VideoQDiff", NULL, 0)))
ffserver_set_int_param(&VAR_0->max_qdiff, e->value, 0, INT_MIN, INT_MAX, NULL, 0, NULL); if ((e = av_dict_get(VAR_1, "VideoQMax", NULL, 0)))
ffserver_set_int_param(&VAR_0->qmax, e->value, 0, INT_MIN, INT_MAX, NULL, 0, NULL); if ((e = av_dict_get(VAR_1, "VideoQMin", NULL, 0)))
ffserver_set_int_param(&VAR_0->qmin, e->value, 0, INT_MIN, INT_MAX, NULL, 0, NULL); if ((e = av_dict_get(VAR_1, "LumiMask", NULL, 0)))
ffserver_set_float_param(&VAR_0->lumi_masking, e->value, 0, -FLT_MAX, FLT_MAX, NULL, 0, NULL); if ((e = av_dict_get(VAR_1, "DarkMask", NULL, 0)))
ffserver_set_float_param(&VAR_0->dark_masking, e->value, 0, -FLT_MAX, FLT_MAX, NULL, 0, NULL); if (av_dict_get(VAR_1, "BitExact", NULL, 0))
VAR_0->flags |= CODEC_FLAG_BITEXACT; if (av_dict_get(VAR_1, "DctFastint", NULL, 0))
VAR_0->dct_algo  = FF_DCT_FASTINT; if (av_dict_get(VAR_1, "IdctSimple", NULL, 0))
VAR_0->idct_algo = FF_IDCT_SIMPLE; if (av_dict_get(VAR_1, "VideoHighQuality", NULL, 0))
VAR_0->mb_decision = FF_MB_DECISION_BITS; if ((e = av_dict_get(VAR_1, "VideoTag", NULL, 0)))
VAR_0->codec_tag = MKTAG(e->value[0], e->value[1], e->value[2], e->value[3]); if (av_dict_get(VAR_1, "Qscale", NULL, 0)) { VAR_0->flags |= CODEC_FLAG_QSCALE; ffserver_set_int_param(&VAR_0->global_quality, e->value, FF_QP2LAMBDA, INT_MIN, INT_MAX, NULL, 0, NULL); } if (av_dict_get(VAR_1, "Video4MotionVector", NULL, 0)) { VAR_0->mb_decision = FF_MB_DECISION_BITS; VAR_0->flags |= CODEC_FLAG_4MV; } if ((e = av_dict_get(VAR_1, "AudioChannels", NULL, 0)))
ffserver_set_int_param(&VAR_0->channels, e->value, 0, INT_MIN, INT_MAX, NULL, 0, NULL); if ((e = av_dict_get(VAR_1, "AudioSampleRate", NULL, 0)))
ffserver_set_int_param(&VAR_0->sample_rate, e->value, 0, INT_MIN, INT_MAX, NULL, 0, NULL); if ((e = av_dict_get(VAR_1, "AudioBitRate", NULL, 0)))
ffserver_set_int_param(&VAR_0->bit_rate, e->value, 0, INT_MIN, INT_MAX, NULL, 0, NULL); av_opt_set_dict2(VAR_0, VAR_2, AV_OPT_SEARCH_CHILDREN); e = NULL; while (e = av_dict_get(*VAR_2, "", e, AV_DICT_IGNORE_SUFFIX)) { av_log(NULL, AV_LOG_ERROR, "Provided AVOption '%s' doesn't match any existing option.\n", e->key); VAR_3 = AVERROR(EINVAL); } return VAR_3; }