Revision f59d8ff8 libavformat/asfdec.c

View differences:

libavformat/asfdec.c
181 181
    av_metadata_set2(&s->metadata, key, value, 0);
182 182
finish:
183 183
    av_freep(&value);
184
    url_fseek(s->pb, off + len, SEEK_SET);
184
    avio_seek(s->pb, off + len, SEEK_SET);
185 185
}
186 186

  
187 187
static int asf_read_file_properties(AVFormatContext *s, int64_t size)
......
427 427
    for (i=0; i<stream_ct; i++){
428 428
        avio_rl16(pb);
429 429
        ext_len = avio_rl16(pb);
430
        url_fseek(pb, ext_len, SEEK_CUR);
430
        avio_seek(pb, ext_len, SEEK_CUR);
431 431
    }
432 432

  
433 433
    for (i=0; i<payload_ext_ct; i++){
434 434
        ff_get_guid(pb, &g);
435 435
        ext_d=avio_rl16(pb);
436 436
        ext_len=avio_rl32(pb);
437
        url_fseek(pb, ext_len, SEEK_CUR);
437
        avio_seek(pb, ext_len, SEEK_CUR);
438 438
    }
439 439

  
440 440
    return 0;
......
653 653
        }
654 654
        if(url_ftell(pb) != gpos + gsize)
655 655
            av_log(s, AV_LOG_DEBUG, "gpos mismatch our pos=%"PRIu64", end=%"PRIu64"\n", url_ftell(pb)-gpos, gsize);
656
        url_fseek(pb, gpos + gsize, SEEK_SET);
656
        avio_seek(pb, gpos + gsize, SEEK_SET);
657 657
    }
658 658
    ff_get_guid(pb, &g);
659 659
    avio_rl64(pb);
......
757 757
        d= avio_r8(pb);
758 758
        rsize+=3;
759 759
    }else{
760
        url_fseek(pb, -1, SEEK_CUR); //FIXME
760
        avio_seek(pb, -1, SEEK_CUR); //FIXME
761 761
    }
762 762

  
763 763
    asf->packet_flags    = c;
......
1145 1145
    if (s->packet_size > 0)
1146 1146
        pos= (pos+s->packet_size-1-s->data_offset)/s->packet_size*s->packet_size+ s->data_offset;
1147 1147
    *ppos= pos;
1148
    url_fseek(s->pb, pos, SEEK_SET);
1148
    avio_seek(s->pb, pos, SEEK_SET);
1149 1149

  
1150 1150
//printf("asf_read_pts\n");
1151 1151
    asf_reset_header(s);
......
1187 1187
    int64_t current_pos= url_ftell(s->pb);
1188 1188
    int i;
1189 1189

  
1190
    url_fseek(s->pb, asf->data_object_offset + asf->data_object_size, SEEK_SET);
1190
    avio_seek(s->pb, asf->data_object_offset + asf->data_object_size, SEEK_SET);
1191 1191
    ff_get_guid(s->pb, &g);
1192 1192

  
1193 1193
    /* the data object can be followed by other top-level objects,
......
1195 1195
    while (ff_guidcmp(&g, &index_guid)) {
1196 1196
        int64_t gsize= avio_rl64(s->pb);
1197 1197
        if (gsize < 24 || url_feof(s->pb)) {
1198
            url_fseek(s->pb, current_pos, SEEK_SET);
1198
            avio_seek(s->pb, current_pos, SEEK_SET);
1199 1199
            return;
1200 1200
        }
1201
        url_fseek(s->pb, gsize-24, SEEK_CUR);
1201
        avio_seek(s->pb, gsize-24, SEEK_CUR);
1202 1202
        ff_get_guid(s->pb, &g);
1203 1203
    }
1204 1204

  
......
1226 1226
        }
1227 1227
        asf->index_read= 1;
1228 1228
    }
1229
    url_fseek(s->pb, current_pos, SEEK_SET);
1229
    avio_seek(s->pb, current_pos, SEEK_SET);
1230 1230
}
1231 1231

  
1232 1232
static int asf_read_seek(AVFormatContext *s, int stream_index, int64_t pts, int flags)
......
1264 1264

  
1265 1265
    // various attempts to find key frame have failed so far
1266 1266
    //    asf_reset_header(s);
1267
    //    url_fseek(s->pb, pos, SEEK_SET);
1267
    //    avio_seek(s->pb, pos, SEEK_SET);
1268 1268
    //    key_pos = pos;
1269 1269
    //     for(i=0;i<16;i++){
1270 1270
    //         pos = url_ftell(s->pb);
......
1285 1285

  
1286 1286
        /* do the seek */
1287 1287
        av_log(s, AV_LOG_DEBUG, "SEEKTO: %"PRId64"\n", pos);
1288
        url_fseek(s->pb, pos, SEEK_SET);
1288
        avio_seek(s->pb, pos, SEEK_SET);
1289 1289
    }
1290 1290
    asf_reset_header(s);
1291 1291
    return 0;

Also available in: Unified diff