[FFmpeg-devel] [PATCH] lavf/matroskadec: work around additional broken index cases
Rodger Combs
rodger.combs at gmail.com
Sun Aug 23 09:47:39 CEST 2015
---
libavformat/matroskadec.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/libavformat/matroskadec.c b/libavformat/matroskadec.c
index f97ae16..7f4a52b 100644
--- a/libavformat/matroskadec.c
+++ b/libavformat/matroskadec.c
@@ -1520,8 +1520,10 @@ static void matroska_add_index_entries(MatroskaDemuxContext *matroska)
index_list = &matroska->index;
index = index_list->elem;
- if (index_list->nb_elem &&
- index[0].time > 1E14 / matroska->time_scale) {
+ if ((index_list->nb_elem &&
+ index[0].time > 1E14 / matroska->time_scale) ||
+ (index_list->nb_elem > 1 &&
+ index[1].time > 1E14 / matroska->time_scale)) {
av_log(matroska->ctx, AV_LOG_WARNING, "Working around broken index.\n");
index_scale = matroska->time_scale;
}
--
2.4.1
More information about the ffmpeg-devel
mailing list