Revision f59d8ff8 libavformat/avidec.c

View differences:

libavformat/avidec.c
205 205
                return -1;
206 206
            }
207 207

  
208
            url_fseek(pb, offset+8, SEEK_SET);
208
            avio_seek(pb, offset+8, SEEK_SET);
209 209
            avi->odml_depth++;
210 210
            read_braindead_odml_indx(s, frame_num);
211 211
            avi->odml_depth--;
212 212
            frame_num += duration;
213 213

  
214
            url_fseek(pb, pos, SEEK_SET);
214
            avio_seek(pb, pos, SEEK_SET);
215 215
        }
216 216
    }
217 217
    avi->index_loaded=1;
......
668 668
            if(!url_is_streamed(pb) && !(s->flags & AVFMT_FLAG_IGNIDX)){
669 669
                read_braindead_odml_indx(s, 0);
670 670
            }
671
            url_fseek(pb, i+size, SEEK_SET);
671
            avio_seek(pb, i+size, SEEK_SET);
672 672
            break;
673 673
        case MKTAG('v', 'p', 'r', 'p'):
674 674
            if(stream_index < (unsigned)s->nb_streams && size > 9*4){
......
693 693
                }
694 694
                size -= 9*4;
695 695
            }
696
            url_fseek(pb, size, SEEK_CUR);
696
            avio_seek(pb, size, SEEK_CUR);
697 697
            break;
698 698
        case MKTAG('s', 't', 'r', 'n'):
699 699
            if(s->nb_streams){
......
892 892
        if(i>=0){
893 893
            int64_t pos= best_st->index_entries[i].pos;
894 894
            pos += best_ast->packet_size - best_ast->remaining;
895
            url_fseek(s->pb, pos + 8, SEEK_SET);
895
            avio_seek(s->pb, pos + 8, SEEK_SET);
896 896
//        av_log(s, AV_LOG_DEBUG, "pos=%"PRId64"\n", pos);
897 897

  
898 898
            assert(best_ast->remaining <= best_ast->packet_size);
......
1174 1174

  
1175 1175
        if(n >= 2){
1176 1176
            int64_t pos= st->index_entries[0].pos;
1177
            url_fseek(s->pb, pos + 4, SEEK_SET);
1177
            avio_seek(s->pb, pos + 4, SEEK_SET);
1178 1178
            size= avio_rl32(s->pb);
1179 1179
            if(pos + size > st->index_entries[1].pos)
1180 1180
                last_start= INT64_MAX;
......
1185 1185
        if(st->index_entries[n-1].pos < first_end)
1186 1186
            first_end= st->index_entries[n-1].pos;
1187 1187
    }
1188
    url_fseek(s->pb, oldpos, SEEK_SET);
1188
    avio_seek(s->pb, oldpos, SEEK_SET);
1189 1189
    return last_start > first_end;
1190 1190
}
1191 1191

  
......
1197 1197
    int64_t pos= url_ftell(pb);
1198 1198
    int ret = -1;
1199 1199

  
1200
    if (url_fseek(pb, avi->movi_end, SEEK_SET) < 0)
1200
    if (avio_seek(pb, avi->movi_end, SEEK_SET) < 0)
1201 1201
        goto the_end; // maybe truncated file
1202 1202
#ifdef DEBUG_SEEK
1203 1203
    printf("movi_end=0x%"PRIx64"\n", avi->movi_end);
......
1225 1225
        default:
1226 1226
        skip:
1227 1227
            size += (size & 1);
1228
            if (url_fseek(pb, size, SEEK_CUR) < 0)
1228
            if (avio_seek(pb, size, SEEK_CUR) < 0)
1229 1229
                goto the_end; // something is wrong here
1230 1230
            break;
1231 1231
        }
1232 1232
    }
1233 1233
 the_end:
1234
    url_fseek(pb, pos, SEEK_SET);
1234
    avio_seek(pb, pos, SEEK_SET);
1235 1235
    return ret;
1236 1236
}
1237 1237

  
......
1282 1282
        /* DV demux so it can synthesize correct timestamps.        */
1283 1283
        dv_offset_reset(avi->dv_demux, timestamp);
1284 1284

  
1285
        url_fseek(s->pb, pos, SEEK_SET);
1285
        avio_seek(s->pb, pos, SEEK_SET);
1286 1286
        avi->stream_index= -1;
1287 1287
        return 0;
1288 1288
    }
......
1324 1324
    }
1325 1325

  
1326 1326
    /* do the seek */
1327
    url_fseek(s->pb, pos, SEEK_SET);
1327
    avio_seek(s->pb, pos, SEEK_SET);
1328 1328
    avi->stream_index= -1;
1329 1329
    return 0;
1330 1330
}

Also available in: Unified diff