Revision 66e5b1df libavformat/asfdec.c

View differences:

libavformat/asfdec.c
639 639
            continue;
640 640
        } else if (!ff_guidcmp(&g, &ff_asf_marker_header)) {
641 641
            asf_read_marker(s, gsize);
642
        } else if (url_feof(pb)) {
642
        } else if (pb->eof_reached) {
643 643
            return -1;
644 644
        } else {
645 645
            if (!s->keylen) {
......
660 660
    avio_rl64(pb);
661 661
    avio_r8(pb);
662 662
    avio_r8(pb);
663
    if (url_feof(pb))
663
    if (pb->eof_reached)
664 664
        return -1;
665 665
    asf->data_offset = avio_tell(pb);
666 666
    asf->packet_size_left = 0;
......
745 745
         */
746 746
        if (url_ferror(pb) == AVERROR(EAGAIN))
747 747
            return AVERROR(EAGAIN);
748
        if (!url_feof(pb))
748
        if (!pb->eof_reached)
749 749
            av_log(s, AV_LOG_ERROR, "ff asf bad header %x  at:%"PRId64"\n", c, avio_tell(pb));
750 750
    }
751 751
    if ((c & 0x8f) == 0x82) {
752 752
        if (d || e) {
753
            if (!url_feof(pb))
753
            if (!pb->eof_reached)
754 754
                av_log(s, AV_LOG_ERROR, "ff asf bad non zero\n");
755 755
            return -1;
756 756
        }
......
886 886
    ASFStream *asf_st = 0;
887 887
    for (;;) {
888 888
        int ret;
889
        if(url_feof(pb))
889
        if(pb->eof_reached)
890 890
            return AVERROR_EOF;
891 891
        if (asf->packet_size_left < FRAME_HEADER_SIZE
892 892
            || asf->packet_segments < 1) {
......
1195 1195
       skip them until the simple index object is reached */
1196 1196
    while (ff_guidcmp(&g, &index_guid)) {
1197 1197
        int64_t gsize= avio_rl64(s->pb);
1198
        if (gsize < 24 || url_feof(s->pb)) {
1198
        if (gsize < 24 || s->pb->eof_reached) {
1199 1199
            avio_seek(s->pb, current_pos, SEEK_SET);
1200 1200
            return;
1201 1201
        }

Also available in: Unified diff