static int modify_current_stream(HTTPContext *c, char *rates)
{
    int i;
    FFStream *req = c->stream;
    int action_required = 0;
    for (i = 0; i < req->nb_streams; i++) {
        AVCodecContext *codec = &req->streams[i]->codec;
        switch(rates[i]) {
            case 0:
                c->switch_feed_streams[i] = req->feed_streams[i];
                break;
            case 1:
                c->switch_feed_streams[i] = find_stream_in_feed(req->feed, codec, codec->bit_rate / 2);
                break;
            case 2:
                /* Wants off or slow */
                c->switch_feed_streams[i] = find_stream_in_feed(req->feed, codec, codec->bit_rate / 4);
#ifdef WANTS_OFF
                /* This doesn't work well when it turns off the only stream! */
                c->switch_feed_streams[i] = -2;
                c->feed_streams[i] = -2;
#endif
                break;
        }
        if (c->switch_feed_streams[i] >= 0 && c->switch_feed_streams[i] != c->feed_streams[i])
            action_required = 1;
    }
    return action_required;
}
static int modify_current_stream(HTTPContext *c, char *rates)
{
    int i;
    FFStream *req = c->stream;
    int action_required = 0;
    for (i = 0; i < req->nb_streams; i++) {
        AVCodecContext *codec = &req->streams[i]->codec;
        switch(rates[i]) {
            case 0:
                c->switch_feed_streams[i] = req->feed_streams[i];
                break;
            case 1:
                c->switch_feed_streams[i] = find_stream_in_feed(req->feed, codec, codec->bit_rate / 2);
                break;
            case 2:
                
                c->switch_feed_streams[i] = find_stream_in_feed(req->feed, codec, codec->bit_rate / 4);
#ifdef WANTS_OFF
                
                c->switch_feed_streams[i] = -2;
                c->feed_streams[i] = -2;
#endif
                break;
        }
        if (c->switch_feed_streams[i] >= 0 && c->switch_feed_streams[i] != c->feed_streams[i])
            action_required = 1;
    }
    return action_required;
}
static int FUNC_0(HTTPContext *VAR_0, char *VAR_1)
{
    int VAR_2;
    FFStream *req = VAR_0->stream;
    int VAR_3 = 0;
    for (VAR_2 = 0; VAR_2 < req->nb_streams; VAR_2++) {
        AVCodecContext *codec = &req->streams[VAR_2]->codec;
        switch(VAR_1[VAR_2]) {
            case 0:
                VAR_0->switch_feed_streams[VAR_2] = req->feed_streams[VAR_2];
                break;
            case 1:
                VAR_0->switch_feed_streams[VAR_2] = find_stream_in_feed(req->feed, codec, codec->bit_rate / 2);
                break;
            case 2:
                
                VAR_0->switch_feed_streams[VAR_2] = find_stream_in_feed(req->feed, codec, codec->bit_rate / 4);
#ifdef WANTS_OFF
                
                VAR_0->switch_feed_streams[VAR_2] = -2;
                VAR_0->feed_streams[VAR_2] = -2;
#endif
                break;
        }
        if (VAR_0->switch_feed_streams[VAR_2] >= 0 && VAR_0->switch_feed_streams[VAR_2] != VAR_0->feed_streams[VAR_2])
            VAR_3 = 1;
    }
    return VAR_3;
}
static int FUNC_0(HTTPContext *VAR_0, char *VAR_1)
{ int VAR_2; FFStream *req = VAR_0->stream; int VAR_3 = 0; for (VAR_2 = 0; VAR_2 < req->nb_streams; VAR_2++) { AVCodecContext *codec = &req->streams[VAR_2]->codec; switch(VAR_1[VAR_2]) { case 0:
VAR_0->switch_feed_streams[VAR_2] = req->feed_streams[VAR_2]; break; case 1:
VAR_0->switch_feed_streams[VAR_2] = find_stream_in_feed(req->feed, codec, codec->bit_rate / 2); break; case 2:
VAR_0->switch_feed_streams[VAR_2] = find_stream_in_feed(req->feed, codec, codec->bit_rate / 4); #ifdef WANTS_OFF
VAR_0->switch_feed_streams[VAR_2] = -2; VAR_0->feed_streams[VAR_2] = -2; #endif
break; } if (VAR_0->switch_feed_streams[VAR_2] >= 0 && VAR_0->switch_feed_streams[VAR_2] != VAR_0->feed_streams[VAR_2])
VAR_3 = 1; } return VAR_3; }