Revision 66e5b1df libavformat/aviobuf.c

View differences:

libavformat/aviobuf.c
265 265
    return size;
266 266
}
267 267

  
268
#if FF_API_OLD_AVIO
268 269
int url_feof(AVIOContext *s)
269 270
{
270 271
    if(!s)
271 272
        return 0;
272 273
    return s->eof_reached;
273 274
}
275
#endif
274 276

  
275 277
int url_ferror(AVIOContext *s)
276 278
{
......
598 600
    }
599 601
    if (size1 == size) {
600 602
        if (url_ferror(s)) return url_ferror(s);
601
        if (url_feof(s))   return AVERROR_EOF;
603
        if (s->eof_reached)   return AVERROR_EOF;
602 604
    }
603 605
    return size1 - size;
604 606
}
......
621 623
    s->buf_ptr += len;
622 624
    if (!len) {
623 625
        if (url_ferror(s)) return url_ferror(s);
624
        if (url_feof(s))   return AVERROR_EOF;
626
        if (s->eof_reached)   return AVERROR_EOF;
625 627
    }
626 628
    return len;
627 629
}
......
928 930
    char *q;
929 931

  
930 932
    c = avio_r8(s);
931
    if (url_feof(s))
933
    if (s->eof_reached)
932 934
        return NULL;
933 935
    q = buf;
934 936
    for(;;) {
935
        if (url_feof(s) || c == '\n')
937
        if (s->eof_reached || c == '\n')
936 938
            break;
937 939
        if ((q - buf) < buf_size - 1)
938 940
            *q++ = c;

Also available in: Unified diff