changeset 36341:63f19afc5a6f

avidemux: try reading ODML index if the default one is uselessly small. Fixes Bugzilla #2150.
author reimar
date Sat, 31 Aug 2013 06:49:56 +0000
parents 6198c908db85
children bae5b9f9f3a6
files libmpdemux/aviheader.c
diffstat 1 files changed, 5 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/libmpdemux/aviheader.c	Fri Aug 30 19:41:38 2013 +0000
+++ b/libmpdemux/aviheader.c	Sat Aug 31 06:49:56 2013 +0000
@@ -461,7 +461,11 @@
 
 }
 
-if (priv->suidx_size > 0 && priv->idx_size == 0) {
+// Some files contain a dummy non-odml index.
+// Ignore an index smaller than some arbitrary size.
+// Some Canon cameras recording in MJPEG do this
+// (encoder software identifier CanonMVI06).
+if (priv->suidx_size > 0 && priv->idx_size < 4) {
     /*
      * No NEWAVIINDEX, but we got an OpenDML index.
      */