changeset 3771:9e9dce9660e4 libavformat

matroskadec: move setting of matroska->done inside matroska_parse_cluster()
author aurel
date Sun, 24 Aug 2008 23:54:14 +0000
parents 6c71b789c69e
children 7814581e98ff
files matroskadec.c
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/matroskadec.c	Sun Aug 24 17:37:43 2008 +0000
+++ b/matroskadec.c	Sun Aug 24 23:54:14 2008 +0000
@@ -1618,6 +1618,7 @@
                                      blocks[i].bin.pos,  cluster.timecode,
                                      blocks[i].duration, !blocks[i].reference);
     ebml_free(matroska_cluster, &cluster);
+    if (res < 0)  matroska->done = 1;
     return res;
 }
 
@@ -1628,8 +1629,7 @@
     while (matroska_deliver_packet(matroska, pkt)) {
         if (matroska->done)
             return AVERROR(EIO);
-        if (matroska_parse_cluster(matroska) < 0)
-            matroska->done = 1;
+        matroska_parse_cluster(matroska);
     }
 
     return 0;