Commit 23788e6a authored by michael's avatar michael

dont load the index if we cant seek back


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@5475 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 98e9b33f
...@@ -429,8 +429,10 @@ static int avi_read_header(AVFormatContext *s, AVFormatParameters *ap) ...@@ -429,8 +429,10 @@ static int avi_read_header(AVFormatContext *s, AVFormatParameters *ap)
break; break;
case MKTAG('i', 'n', 'd', 'x'): case MKTAG('i', 'n', 'd', 'x'):
i= url_ftell(pb); i= url_ftell(pb);
read_braindead_odml_indx(s, 0); if(!url_is_streamed(pb)){
avi->index_loaded=1; read_braindead_odml_indx(s, 0);
avi->index_loaded=1;
}
url_fseek(pb, i+size, SEEK_SET); url_fseek(pb, i+size, SEEK_SET);
break; break;
default: default:
...@@ -451,7 +453,7 @@ static int avi_read_header(AVFormatContext *s, AVFormatParameters *ap) ...@@ -451,7 +453,7 @@ static int avi_read_header(AVFormatContext *s, AVFormatParameters *ap)
return -1; return -1;
} }
if(!avi->index_loaded) if(!avi->index_loaded && !url_is_streamed(pb))
avi_load_index(s); avi_load_index(s);
avi->index_loaded = 1; avi->index_loaded = 1;
avi->non_interleaved |= guess_ni_flag(s); avi->non_interleaved |= guess_ni_flag(s);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment