Commit 4f7d9b77 authored by Rodger Combs's avatar Rodger Combs Committed by Michael Niedermayer

lavf/matroskadec: drop indexes that appear broken

Signed-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
parent b3f8d871
...@@ -1521,10 +1521,11 @@ static void matroska_add_index_entries(MatroskaDemuxContext *matroska) ...@@ -1521,10 +1521,11 @@ static void matroska_add_index_entries(MatroskaDemuxContext *matroska)
index_list = &matroska->index; index_list = &matroska->index;
index = index_list->elem; index = index_list->elem;
if (index_list->nb_elem && if (index_list->nb_elem < 2)
index[0].time > 1E14 / matroska->time_scale) { return;
av_log(matroska->ctx, AV_LOG_WARNING, "Working around broken index.\n"); if (index[1].time > 1E14 / matroska->time_scale) {
index_scale = matroska->time_scale; av_log(matroska->ctx, AV_LOG_WARNING, "Dropping apparently-broken index.\n");
return;
} }
for (i = 0; i < index_list->nb_elem; i++) { for (i = 0; i < index_list->nb_elem; i++) {
EbmlList *pos_list = &index[i].pos; EbmlList *pos_list = &index[i].pos;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment