summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libavformat/avidec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/avidec.c b/libavformat/avidec.c
index 21d5019029..8744be685a 100644
--- a/libavformat/avidec.c
+++ b/libavformat/avidec.c
@@ -243,7 +243,7 @@ static int avi_read_header(AVFormatContext *s, AVFormatParameters *ap)
#endif
if (tag1 == MKTAG('m', 'o', 'v', 'i')) {
avi->movi_list = url_ftell(pb) - 4;
- if(size) avi->movi_end = avi->movi_list + size;
+ if(size) avi->movi_end = avi->movi_list + size + (size & 1);
else avi->movi_end = url_fsize(pb);
#ifdef DEBUG
printf("movi end=%Lx\n", avi->movi_end);