From: tiqq <tiqq2@gm...>  20090114 17:53:54

Hi! 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.... Are negative values allowed here? Since I don´t have the spec, I don´t know if this is a bug in the encoder or in xine. Coul´d some one check this out? Here is the possible code change in demux_matroska.c: static int parse_block (demux_matroska_t *this, uint64_t block_size, uint64_t cluster_timecode, uint64_t block_duration, int normpos, int is_key) { matroska_track_t *track; int64_t track_num; 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; data = this>block_data; if (!(num_len = parse_ebml_uint(this, data, &track_num))) return 0; data += num_len;  timecode_diff = (int)_X_BE_16(data); + timecode_diff = (int16_t)_X_BE_16(data); data += 2; flags = *data; data += 1; 