diff options
Diffstat (limited to 'libavformat/rl2.c')
-rw-r--r-- | libavformat/rl2.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/libavformat/rl2.c b/libavformat/rl2.c index 8b6a7f1827..6a559c7294 100644 --- a/libavformat/rl2.c +++ b/libavformat/rl2.c @@ -237,9 +237,10 @@ static int rl2_read_packet(AVFormatContext *s, /** check if there is a valid video or audio entry that can be used */ for(i=0; i<s->nb_streams; i++){ - if(rl2->index_pos[i] < s->streams[i]->internal->nb_index_entries - && s->streams[i]->internal->index_entries[ rl2->index_pos[i] ].pos < pos){ - sample = &s->streams[i]->internal->index_entries[ rl2->index_pos[i] ]; + const FFStream *const sti = ffstream(s->streams[i]); + if (rl2->index_pos[i] < sti->nb_index_entries + && sti->index_entries[ rl2->index_pos[i] ].pos < pos) { + sample = &sti->index_entries[ rl2->index_pos[i] ]; pos= sample->pos; stream_id= i; } @@ -283,7 +284,7 @@ static int rl2_read_seek(AVFormatContext *s, int stream_index, int64_t timestamp return -1; rl2->index_pos[stream_index] = index; - timestamp = st->internal->index_entries[index].timestamp; + timestamp = ffstream(st)->index_entries[index].timestamp; for(i=0; i < s->nb_streams; i++){ AVStream *st2 = s->streams[i]; |