aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2006-03-01 11:41:16 +0000
committerMichael Niedermayer <michaelni@gmx.at>2006-03-01 11:41:16 +0000
commit5c89153e906b7c250604533b4002a7ec8b3b5202 (patch)
treeed5365be5ff77de820ca8c35bb550e0bb575e406
parent30a43f2d09d4ddb7f6335dfd32796896e64b2655 (diff)
downloadffmpeg-5c89153e906b7c250604533b4002a7ec8b3b5202.tar.gz
add movi_list offset into index
Originally committed as revision 5084 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r--libavformat/avidec.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavformat/avidec.c b/libavformat/avidec.c
index 2fede84528..c022b466ad 100644
--- a/libavformat/avidec.c
+++ b/libavformat/avidec.c
@@ -467,7 +467,7 @@ static int avi_read_packet(AVFormatContext *s, AVPacket *pkt)
// av_log(NULL, AV_LOG_DEBUG, "%d\n", i);
if(i>=0){
int64_t pos= best_st->index_entries[i].pos;
- pos += avi->movi_list + best_ast->packet_size - best_ast->remaining;
+ pos += best_ast->packet_size - best_ast->remaining;
url_fseek(&s->pb, pos, SEEK_SET);
// av_log(NULL, AV_LOG_DEBUG, "pos=%Ld\n", pos);
@@ -689,6 +689,7 @@ static int avi_read_idx1(AVFormatContext *s, int size)
#endif
if(i==0 && pos > avi->movi_list)
avi->movi_list= 0; //FIXME better check
+ pos += avi->movi_list;
index = ((tag & 0xff) - '0') * 10;
index += ((tag >> 8) & 0xff) - '0';
@@ -838,7 +839,6 @@ static int avi_read_seek(AVFormatContext *s, int stream_index, int64_t timestamp
if (avi->dv_demux)
dv_flush_audio_packets(avi->dv_demux);
/* do the seek */
- pos += avi->movi_list;
url_fseek(&s->pb, pos, SEEK_SET);
avi->stream_index= -1;
return 0;