diff --git a/libavformat/mov.c b/libavformat/mov.c index 5c9f926bce..0b8f8ad24b 100644 --- a/libavformat/mov.c +++ b/libavformat/mov.c @@ -1188,11 +1188,12 @@ static void set_frag_stream(MOVFragmentIndex *frag_index, int id) static MOVFragmentStreamInfo * get_current_frag_stream_info( MOVFragmentIndex *frag_index) { + MOVFragmentIndexItem *item; if (frag_index->current < 0 || frag_index->current >= frag_index->nb_items) return NULL; - MOVFragmentIndexItem * item = &frag_index->item[frag_index->current]; + item = &frag_index->item[frag_index->current]; if (item->current >= 0 && item->current < item->nb_stream_info) return &item->stream_info[item->current];