# HG changeset patch # User conrad # Date 1274217688 0 # Node ID ce535a7152ef715a7ddb5a45df3481ee9f444f51 # Parent 8986c1d43cb234c46feb52ec66ab2c308f7da7b4 matroskadec: Ensure time_scale is nonzero, fixes divide-by-zero if the file has 0 written Based on a Chromium patch diff -r 8986c1d43cb2 -r ce535a7152ef matroskadec.c --- a/matroskadec.c Tue May 18 21:21:23 2010 +0000 +++ b/matroskadec.c Tue May 18 21:21:28 2010 +0000 @@ -1154,6 +1154,8 @@ return -1; matroska_execute_seekhead(matroska); + if (!matroska->time_scale) + matroska->time_scale = 1000000; if (matroska->duration) matroska->ctx->duration = matroska->duration * matroska->time_scale * 1000 / AV_TIME_BASE;