projects
/
platform
/
upstream
/
ffmpeg.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
13a1db1
)
Patch for invalid AVI file. data chunk size in idx1 is wrong
author
hj kim
<backto.kim@samsung.com>
Fri, 6 Nov 2020 03:32:56 +0000
(12:32 +0900)
committer
backto.kim
<backto.kim@samsung.com>
Mon, 6 Dec 2021 06:49:13 +0000
(15:49 +0900)
Change-Id: Ifbfa56237be073cb83b629a8ad6bc192c4e336fa
libavformat/avidec.c
patch
|
blob
|
history
diff --git
a/libavformat/avidec.c
b/libavformat/avidec.c
index
542161e
..
d59240c
100644
(file)
--- a/
libavformat/avidec.c
+++ b/
libavformat/avidec.c
@@
-1647,12
+1647,25
@@
static int avi_read_idx1(AVFormatContext *s, int size)
// switch to non-interleaved to get correct timestamps
if (last_pos == pos)
avi->non_interleaved = 1;
// switch to non-interleaved to get correct timestamps
if (last_pos == pos)
avi->non_interleaved = 1;
+#ifdef __TIZEN__
+ //[DF170418-00597] issue fix
+ if (last_idx != pos && len < avi->fsize) {
+ av_add_index_entry(st, pos, ast->cum_len, len, 0,
+ (flags & AVIIF_INDEX) ? AVINDEX_KEYFRAME : 0);
+ last_idx= pos;
+ }
+ if (len < avi->fsize)
+ ast->cum_len += get_duration(ast, len);
+ else
+ av_log(s, AV_LOG_TRACE, "invalid len : fsize=%lld i=%d len=%d \n", avi->fsize, i, len);
+#else
if (last_idx != pos && len) {
av_add_index_entry(st, pos, ast->cum_len, len, 0,
(flags & AVIIF_INDEX) ? AVINDEX_KEYFRAME : 0);
last_idx= pos;
}
ast->cum_len += get_duration(ast, len);
if (last_idx != pos && len) {
av_add_index_entry(st, pos, ast->cum_len, len, 0,
(flags & AVIIF_INDEX) ? AVINDEX_KEYFRAME : 0);
last_idx= pos;
}
ast->cum_len += get_duration(ast, len);
+#endif
last_pos = pos;
anykey |= flags&AVIIF_INDEX;
}
last_pos = pos;
anykey |= flags&AVIIF_INDEX;
}