comparison concat.c @ 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
comparison
equal deleted inserted replaced
5771:e8c8f5a002ff 5772:d3d45b140065
158 size_t i; 158 size_t i;
159 159
160 switch (whence) { 160 switch (whence) {
161 case SEEK_END: 161 case SEEK_END:
162 for (i = data->length - 1; 162 for (i = data->length - 1;
163 i && pos < -nodes[i-1].size; 163 i && pos < -nodes[i].size;
164 i--) 164 i--)
165 pos += nodes[i-1].size; 165 pos += nodes[i].size;
166 break; 166 break;
167 case SEEK_CUR: 167 case SEEK_CUR:
168 /* get the absolute position */ 168 /* get the absolute position */
169 for (i = 0; i != data->current; i++) 169 for (i = 0; i != data->current; i++)
170 pos += nodes[i].size; 170 pos += nodes[i].size;