aboutsummaryrefslogtreecommitdiff
path: root/libavformat/avidec.c
diff options
context:
space:
mode:
authorMichael Niedermayer2006-06-14 00:32:10 +0000
committerMichael Niedermayer2006-06-14 00:32:10 +0000
commitb7b225581f08a50a183927bd52aeb8c1b028a36d (patch)
tree21853f93fee7e88b12b4f710ea80ecdbb1e1a5d5 /libavformat/avidec.c
parentef4c8bbfb77e1c9eb8e8212c5820344ea31dd1d9 (diff)
dont load the index if we cant seek back
Originally committed as revision 5475 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/avidec.c')
-rw-r--r--libavformat/avidec.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/libavformat/avidec.c b/libavformat/avidec.c
index d7830b86f2..85e819c9b6 100644
--- a/libavformat/avidec.c
+++ b/libavformat/avidec.c
@@ -429,8 +429,10 @@ static int avi_read_header(AVFormatContext *s, AVFormatParameters *ap)
break;
case MKTAG('i', 'n', 'd', 'x'):
i= url_ftell(pb);
- read_braindead_odml_indx(s, 0);
- avi->index_loaded=1;
+ if(!url_is_streamed(pb)){
+ read_braindead_odml_indx(s, 0);
+ avi->index_loaded=1;
+ }
url_fseek(pb, i+size, SEEK_SET);
break;
default:
@@ -451,7 +453,7 @@ static int avi_read_header(AVFormatContext *s, AVFormatParameters *ap)
return -1;
}
- if(!avi->index_loaded)
+ if(!avi->index_loaded && !url_is_streamed(pb))
avi_load_index(s);
avi->index_loaded = 1;
avi->non_interleaved |= guess_ni_flag(s);