Revision 9ace13b4 libavcodec/ratecontrol.c

View differences:

libavcodec/ratecontrol.c
66 66
int ff_rate_control_init(MpegEncContext *s)
67 67
{
68 68
    RateControlContext *rcc= &s->rc_context;
69
    int i;
69
    int i, res;
70 70
    static const char * const const_names[]={
71 71
        "PI",
72 72
        "E",
......
106 106
    };
107 107
    emms_c();
108 108

  
109
    rcc->rc_eq_eval = ff_parse_expr(s->avctx->rc_eq ? s->avctx->rc_eq : "tex^qComp", const_names, func1_names, func1, NULL, NULL, 0, s->avctx);
110
    if (!rcc->rc_eq_eval) {
109
    res = ff_parse_expr(&rcc->rc_eq_eval, s->avctx->rc_eq ? s->avctx->rc_eq : "tex^qComp", const_names, func1_names, func1, NULL, NULL, 0, s->avctx);
110
    if (res < 0) {
111 111
        av_log(s->avctx, AV_LOG_ERROR, "Error parsing rc_eq \"%s\"\n", s->avctx->rc_eq);
112
        return -1;
112
        return res;
113 113
    }
114 114

  
115 115
    for(i=0; i<5; i++){

Also available in: Unified diff