aboutsummaryrefslogtreecommitdiffhomepage
path: root/libmpdemux
diff options
context:
space:
mode:
Diffstat (limited to 'libmpdemux')
-rw-r--r--libmpdemux/aviheader.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libmpdemux/aviheader.c b/libmpdemux/aviheader.c
index 0751723f4d..b9a29b2924 100644
--- a/libmpdemux/aviheader.c
+++ b/libmpdemux/aviheader.c
@@ -50,9 +50,10 @@ while(1){
mp_msg(MSGT_HEADER,MSGL_DBG2,"LIST %.4s len=%d\n",(char *) &id,len);
if(id==listtypeAVIMOVIE){
// found MOVI header
- demuxer->movi_start=stream_tell(demuxer->stream);
+ if(!demuxer->movi_start) demuxer->movi_start=stream_tell(demuxer->stream);
demuxer->movi_end=demuxer->movi_start+len;
mp_msg(MSGT_HEADER,MSGL_V,"Found movie at 0x%X - 0x%X\n",(int)demuxer->movi_start,(int)demuxer->movi_end);
+ if(demuxer->stream->end_pos) demuxer->movi_end=demuxer->stream->end_pos;
if(index_mode==-2) break; // reading from non-seekable source (stdin)
len=(len+1)&(~1);
stream_skip(demuxer->stream,len);