changeset 5772:d3d45b140065 libavformat

Fix concat seeking SEEK_END case. Patch by Wolfram Gloger wmglo ^ dent.med.uni-muenchen.de.
author stefano
date Mon, 08 Mar 2010 00:40:22 +0000
parents e8c8f5a002ff
children fd3b7b9b63a8
files concat.c
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/concat.c	Mon Mar 08 00:22:03 2010 +0000
+++ b/concat.c	Mon Mar 08 00:40:22 2010 +0000
@@ -160,9 +160,9 @@
     switch (whence) {
     case SEEK_END:
         for (i = data->length - 1;
-             i && pos < -nodes[i-1].size;
+             i && pos < -nodes[i].size;
              i--)
-            pos += nodes[i-1].size;
+            pos += nodes[i].size;
         break;
     case SEEK_CUR:
         /* get the absolute position */