Revision dce37564 libavformat/rtmppkt.c

View differences:

libavformat/rtmppkt.c
86 86

  
87 87
    if (channel_id < 2) { //special case for channel number >= 64
88 88
        buf[1] = 0;
89
        if (url_read_complete(h, buf, channel_id + 1) != channel_id + 1)
89
        if (ffurl_read_complete(h, buf, channel_id + 1) != channel_id + 1)
90 90
            return AVERROR(EIO);
91 91
        size += channel_id + 1;
92 92
        channel_id = AV_RL16(buf) + 64;
......
99 99
    if (hdr == RTMP_PS_ONEBYTE) {
100 100
        timestamp = prev_pkt[channel_id].ts_delta;
101 101
    } else {
102
        if (url_read_complete(h, buf, 3) != 3)
102
        if (ffurl_read_complete(h, buf, 3) != 3)
103 103
            return AVERROR(EIO);
104 104
        size += 3;
105 105
        timestamp = AV_RB24(buf);
106 106
        if (hdr != RTMP_PS_FOURBYTES) {
107
            if (url_read_complete(h, buf, 3) != 3)
107
            if (ffurl_read_complete(h, buf, 3) != 3)
108 108
                return AVERROR(EIO);
109 109
            size += 3;
110 110
            data_size = AV_RB24(buf);
111
            if (url_read_complete(h, buf, 1) != 1)
111
            if (ffurl_read_complete(h, buf, 1) != 1)
112 112
                return AVERROR(EIO);
113 113
            size++;
114 114
            type = buf[0];
115 115
            if (hdr == RTMP_PS_TWELVEBYTES) {
116
                if (url_read_complete(h, buf, 4) != 4)
116
                if (ffurl_read_complete(h, buf, 4) != 4)
117 117
                    return AVERROR(EIO);
118 118
                size += 4;
119 119
                extra = AV_RL32(buf);
120 120
            }
121 121
        }
122 122
        if (timestamp == 0xFFFFFF) {
123
            if (url_read_complete(h, buf, 4) != 4)
123
            if (ffurl_read_complete(h, buf, 4) != 4)
124 124
                return AVERROR(EIO);
125 125
            timestamp = AV_RB32(buf);
126 126
        }
......
140 140
    prev_pkt[channel_id].extra      = extra;
141 141
    while (data_size > 0) {
142 142
        int toread = FFMIN(data_size, chunk_size);
143
        if (url_read_complete(h, p->data + offset, toread) != toread) {
143
        if (ffurl_read_complete(h, p->data + offset, toread) != toread) {
144 144
            ff_rtmp_packet_destroy(p);
145 145
            return AVERROR(EIO);
146 146
        }
......
148 148
        offset    += chunk_size;
149 149
        size      += chunk_size;
150 150
        if (data_size > 0) {
151
            url_read_complete(h, &t, 1); //marker
151
            ffurl_read_complete(h, &t, 1); //marker
152 152
            size++;
153 153
            if (t != (0xC0 + channel_id))
154 154
                return -1;

Also available in: Unified diff