|
|
|
@@ -130,8 +130,8 @@ static int parse_keyframes_index(AVFormatContext *s, AVIOContext *ioc, AVStream |
|
|
|
char str_val[256]; |
|
|
|
int64_t *times = NULL; |
|
|
|
int64_t *filepositions = NULL; |
|
|
|
int ret = 0; |
|
|
|
int64_t initial_pos = url_ftell(ioc); |
|
|
|
int ret = AVERROR(ENOSYS); |
|
|
|
int64_t initial_pos = avio_tell(ioc); |
|
|
|
|
|
|
|
while (avio_tell(ioc) < max_pos - 2 && amf_get_string(ioc, str_val, sizeof(str_val)) > 0) { |
|
|
|
int64_t** current_array; |
|
|
|
@@ -164,6 +164,12 @@ static int parse_keyframes_index(AVFormatContext *s, AVIOContext *ioc, AVStream |
|
|
|
goto finish; |
|
|
|
current_array[0][i] = av_int2dbl(avio_rb64(ioc)); |
|
|
|
} |
|
|
|
if (times && filepositions) { |
|
|
|
// All done, exiting at a position allowing amf_parse_object |
|
|
|
// to finish parsing the object |
|
|
|
ret = 0; |
|
|
|
break; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
if (timeslen == fileposlen) { |
|
|
|
@@ -520,7 +526,7 @@ leave: |
|
|
|
static int flv_read_seek(AVFormatContext *s, int stream_index, |
|
|
|
int64_t ts, int flags) |
|
|
|
{ |
|
|
|
return ffio_read_seek(s->pb, stream_index, ts, flags); |
|
|
|
return avio_seek_time(s->pb, stream_index, ts, flags); |
|
|
|
} |
|
|
|
|
|
|
|
#if 0 /* don't know enough to implement this */ |
|
|
|
@@ -541,7 +547,7 @@ static int flv_read_seek2(AVFormatContext *s, int stream_index, |
|
|
|
ts = av_rescale_rnd(ts, 1000, AV_TIME_BASE, |
|
|
|
flags & AVSEEK_FLAG_BACKWARD ? AV_ROUND_DOWN : AV_ROUND_UP); |
|
|
|
} |
|
|
|
ret = ffio_read_seek(s->pb, stream_index, ts, flags); |
|
|
|
ret = avio_seek_time(s->pb, stream_index, ts, flags); |
|
|
|
} |
|
|
|
|
|
|
|
if (ret == AVERROR(ENOSYS)) |
|
|
|
|