diff options
author | Mathieu Olivier <molivier@users.sourceforge.net> | 2006-01-24 22:01:05 +0000 |
---|---|---|
committer | Mathieu Olivier <molivier@users.sourceforge.net> | 2006-01-24 22:01:05 +0000 |
commit | 56e99256b3e8fc8aec6baa7a74094ae2e12656c5 (patch) | |
tree | fe044083681d17dbe1dbe3fc989d56cb9dff948f | |
parent | 831f63fa140840937681c867c91d8f54b777d617 (diff) | |
download | xine-lib-56e99256b3e8fc8aec6baa7a74094ae2e12656c5.tar.gz xine-lib-56e99256b3e8fc8aec6baa7a74094ae2e12656c5.tar.bz2 |
Simplified a bit the calculation of the lace sizes for Xiph lacing
CVS patchset: 7842
CVS date: 2006/01/24 22:01:05
-rw-r--r-- | src/demuxers/demux_matroska.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/demuxers/demux_matroska.c b/src/demuxers/demux_matroska.c index fdc6fb7a8..0cfbb3cc0 100644 --- a/src/demuxers/demux_matroska.c +++ b/src/demuxers/demux_matroska.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: demux_matroska.c,v 1.42 2006/01/24 21:59:13 molivier Exp $ + * $Id: demux_matroska.c,v 1.43 2006/01/24 22:01:05 molivier Exp $ * * demultiplexer for matroska streams * @@ -1750,12 +1750,13 @@ static int parse_block (demux_matroska_t *this, uint64_t block_size, /* size of each frame */ for (i = 0; i < lace_num; i++) { int size = 0; - while (*data == 255) { - size += *data; + int partial_size; + do + { + partial_size = *data; + size += partial_size; data++; block_size_left--; - } - size += *data; - data++; block_size_left--; + } while (partial_size == 255); frame[i] = size; block_size_left -= size; } |