summaryrefslogtreecommitdiff
path: root/libavformat/vocdec.c
diff options
context:
space:
mode:
Diffstat (limited to 'libavformat/vocdec.c')
-rw-r--r--libavformat/vocdec.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/libavformat/vocdec.c b/libavformat/vocdec.c
index 0bb2bc4fb1..f235d7635b 100644
--- a/libavformat/vocdec.c
+++ b/libavformat/vocdec.c
@@ -73,6 +73,7 @@ static int voc_read_seek(AVFormatContext *s, int stream_index,
{
VocDecContext *voc = s->priv_data;
AVStream *st;
+ FFStream *sti;
int index;
if (s->nb_streams < 1) {
@@ -81,16 +82,17 @@ static int voc_read_seek(AVFormatContext *s, int stream_index,
}
st = s->streams[stream_index];
+ sti = ffstream(st);
index = av_index_search_timestamp(st, timestamp, flags);
- if (index >= 0 && index < st->internal->nb_index_entries - 1) {
- AVIndexEntry *e = &st->internal->index_entries[index];
+ if (index >= 0 && index < sti->nb_index_entries - 1) {
+ const AVIndexEntry *const e = &sti->index_entries[index];
avio_seek(s->pb, e->pos, SEEK_SET);
voc->pts = e->timestamp;
voc->remaining_size = e->size;
return 0;
- } else if (st->internal->nb_index_entries && st->internal->index_entries[0].timestamp <= timestamp) {
- AVIndexEntry *e = &st->internal->index_entries[st->internal->nb_index_entries - 1];
+ } else if (sti->nb_index_entries && sti->index_entries[0].timestamp <= timestamp) {
+ const AVIndexEntry *const e = &sti->index_entries[sti->nb_index_entries - 1];
// prepare context for seek_frame_generic()
voc->pts = e->timestamp;
voc->remaining_size = e->size;