diff options
author | Dirk Leber <tiqq2@gmx.de> | 2008-01-14 18:53:35 +0100 |
---|---|---|
committer | Dirk Leber <tiqq2@gmx.de> | 2008-01-14 18:53:35 +0100 |
commit | 6f90955bba9d996b0fe9080cc4c13d657562af3c (patch) | |
tree | 6da0b53e46954e96fe3c525f8896883c6a722e08 /src | |
parent | cc96350ed25b072190267641a6af7974524b6d4e (diff) | |
download | xine-lib-6f90955bba9d996b0fe9080cc4c13d657562af3c.tar.gz xine-lib-6f90955bba9d996b0fe9080cc4c13d657562af3c.tar.bz2 |
Signedness bug in Matroska PTS calculation
With some mkv files I had many discontinuity events. I found out that if
changing the timecode_diff in demux_matroska.c from int to int16_t fixes
this problem. Using int will never produce negative values if int is not
16-bit...
Diffstat (limited to 'src')
-rw-r--r-- | src/demuxers/demux_matroska.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/demuxers/demux_matroska.c b/src/demuxers/demux_matroska.c index 086e0cc98..37f4bd95b 100644 --- a/src/demuxers/demux_matroska.c +++ b/src/demuxers/demux_matroska.c @@ -1867,7 +1867,7 @@ static int parse_block (demux_matroska_t *this, size_t block_size, uint8_t *data; uint8_t flags; int gap, lacing, num_len; - int timecode_diff; + int16_t timecode_diff; int64_t pts, xduration; int decoder_flags = 0; @@ -1877,7 +1877,7 @@ static int parse_block (demux_matroska_t *this, size_t block_size, data += num_len; /* timecode_diff is signed */ - timecode_diff = parse_int16(data); + timecode_diff = (int16_t)parse_int16(data); data += 2; flags = *data; |