-
-
Save rcombs/1be9f707d6e57a2d5197 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
commit 9bf8e68962b9697c8ae3c7ffa39a68ab3c54d27d | |
Author: Rodger Combs <rodger.combs@gmail.com> | |
Date: Sun Aug 23 01:48:30 2015 -0500 | |
lavf/matroskadec: work around additional broken index cases | |
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; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment