[FFmpeg-devel] [PATCH] lavf/matroskadec: work around additional broken index cases

wm4 nfxjfg at googlemail.com
Sun Aug 23 19:58:24 CEST 2015


On Sun, 23 Aug 2015 02:47:39 -0500
Rodger Combs <rodger.combs at gmail.com> wrote:

> ---
>  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;
>      }

Seems fishy. Sample file?


More information about the ffmpeg-devel mailing list