ret = url_read(rt->rtsp_hd, buf, 3);
ret = url_readbuf(rt->rtsp_hd, buf, 3);
static int tcp_read_packet(AVFormatContext *s, RTSPStream **prtsp_st,                           uint8_t *buf, int buf_size){    RTSPState *rt = s->priv_data;    int id, len, i, ret;    RTSPStream *rtsp_st;#ifdef DEBUG_RTP_TCP    printf("tcp_read_packet:\n");#endif redo:    for(;;) {        ret = url_read(rt->rtsp_hd, buf, 1);#ifdef DEBUG_RTP_TCP        printf("ret=%d c=%02x [%c]\n", ret, buf[0], buf[0]);#endif        if (ret != 1)            return -1;        if (buf[0] == '$')            break;    }    ret = url_read(rt->rtsp_hd, buf, 3);    if (ret != 3)        return -1;    id = buf[0];    len = (buf[1] << 8) | buf[2];#ifdef DEBUG_RTP_TCP    printf("id=%d len=%d\n", id, len);#endif    if (len > buf_size || len < 12)        goto redo;    /* get the data */    ret = url_read(rt->rtsp_hd, buf, len);    if (ret != len)        return -1;            /* find the matching stream */    for(i = 0; i < rt->nb_rtsp_streams; i++) {        rtsp_st = rt->rtsp_streams[i];        if (id >= rtsp_st->interleaved_min &&             id <= rtsp_st->interleaved_max)             goto found;    }    goto redo; found:    *prtsp_st = rtsp_st;    return len;}