#include "seek.h"
#include "libavutil/mem.h"
+#include "internal.h"
// NOTE: implementation should be moved here in another patch, to keep patches
// separated.
// Evaluate key frames with known TS (or any frames, if AVSEEK_FLAG_ANY set).
if (pts != AV_NOPTS_VALUE &&
- ((flg & PKT_FLAG_KEY) || (flags & AVSEEK_FLAG_ANY))) {
+ ((flg & AV_PKT_FLAG_KEY) || (flags & AVSEEK_FLAG_ANY))) {
if (flags & AVSEEK_FLAG_BYTE) {
// for byte seeking, use position as timestamp
ts = pos;
}
// Clean up the parser.
- av_read_frame_flush(s);
+ ff_read_frame_flush(s);
}
int64_t ff_gen_syncpoint_search(AVFormatContext *s,
step = s->pb->buffer_size;
curpos = FFMAX(pos - step / 2, 0);
for (;;) {
- url_fseek(s->pb, curpos, SEEK_SET);
+ avio_seek(s->pb, curpos, SEEK_SET);
search_hi_lo_keyframes(s,
ts, time_base,
flags,
}
}
- url_fseek(s->pb, pos, SEEK_SET);
+ avio_seek(s->pb, pos, SEEK_SET);
av_free(sync);
return pos;
}
return NULL;
}
- state->fpos = url_ftell(s->pb);
+ state->fpos = avio_tell(s->pb);
// copy context structures
state->cur_st = s->cur_st;
int i;
AVStream *st;
AVParserStreamState *ss;
- av_read_frame_flush(s);
+ ff_read_frame_flush(s);
if (!state)
return;
- url_fseek(s->pb, state->fpos, SEEK_SET);
+ avio_seek(s->pb, state->fpos, SEEK_SET);
// copy context structures
s->cur_st = state->cur_st;