static int update_offset(RTMPContext *rt, int size)

{

    int old_flv_size;



    // generate packet header and put data into buffer for FLV demuxer

    if (rt->flv_off < rt->flv_size) {

        // There is old unread data in the buffer, thus append at the end

        old_flv_size  = rt->flv_size;

        rt->flv_size += size + 15;

    } else {

        // All data has been read, write the new data at the start of the buffer

        old_flv_size = 0;

        rt->flv_size = size + 15;

        rt->flv_off  = 0;

    }



    return old_flv_size;

}

static int update_offset(RTMPContext *rt, int size)

{

    int old_flv_size;



    

    if (rt->flv_off < rt->flv_size) {

        

        old_flv_size  = rt->flv_size;

        rt->flv_size += size + 15;

    } else {

        

        old_flv_size = 0;

        rt->flv_size = size + 15;

        rt->flv_off  = 0;

    }



    return old_flv_size;

}

        rt->flv_size += size + 15;         rt->flv_size = size + 15;
static int FUNC_0(RTMPContext *VAR_0, int VAR_1)

{

    int VAR_2;



    

    if (VAR_0->flv_off < VAR_0->flv_size) {

        

        VAR_2  = VAR_0->flv_size;

        VAR_0->flv_size += VAR_1 + 15;

    } else {

        

        VAR_2 = 0;

        VAR_0->flv_size = VAR_1 + 15;

        VAR_0->flv_off  = 0;

    }



    return VAR_2;

}

static int FUNC_0(RTMPContext *VAR_0, int VAR_1)
{ int VAR_2; if (VAR_0->flv_off < VAR_0->flv_size) { VAR_2  = VAR_0->flv_size; VAR_0->flv_size += VAR_1 + 15; } else { VAR_2 = 0; VAR_0->flv_size = VAR_1 + 15; VAR_0->flv_off  = 0; } return VAR_2; }