Revision 1447dc59 libavformat/oggdec.c

View differences:

libavformat/oggdec.c
218 218
            sync[(sp + 2) & 3] == 'g' && sync[(sp + 3) & 3] == 'S')
219 219
            break;
220 220

  
221
        c = url_fgetc (bc);
222
        if (c < 0)
221
        c = avio_r8(bc);
222
        if (url_feof(bc))
223 223
            return -1;
224 224
        sync[sp++ & 3] = c;
225 225
    }while (i++ < MAX_PAGE_SIZE);
......
229 229
        return -1;
230 230
    }
231 231

  
232
    if (url_fgetc (bc) != 0)      /* version */
232
    if (avio_r8(bc) != 0)      /* version */
233 233
        return -1;
234 234

  
235
    flags = url_fgetc (bc);
235
    flags = avio_r8(bc);
236 236
    gp = avio_rl64 (bc);
237 237
    serial = avio_rl32 (bc);
238 238
    seq = avio_rl32 (bc);
239 239
    crc = avio_rl32 (bc);
240
    nsegs = url_fgetc (bc);
240
    nsegs = avio_r8(bc);
241 241

  
242 242
    idx = ogg_find_stream (ogg, serial);
243 243
    if (idx < 0){

Also available in: Unified diff