diff options
Diffstat (limited to 'src/demuxers/demux_matroska.c')
-rw-r--r-- | src/demuxers/demux_matroska.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/src/demuxers/demux_matroska.c b/src/demuxers/demux_matroska.c index f9f0b23d5..32feacf28 100644 --- a/src/demuxers/demux_matroska.c +++ b/src/demuxers/demux_matroska.c @@ -1847,7 +1847,7 @@ static int parse_block (demux_matroska_t *this, size_t block_size, uint64_t track_num; uint8_t *data; uint8_t flags; - int gap, lacing, num_len; + int lacing, num_len; int16_t timecode_diff; int64_t pts, xduration; int decoder_flags = 0; @@ -1867,7 +1867,7 @@ static int parse_block (demux_matroska_t *this, size_t block_size, lprintf("track_num: %" PRIu64 ", timecode_diff: %d, flags: 0x%x\n", track_num, timecode_diff, flags); - gap = flags & 1; + /*gap = flags & 1;*/ lacing = (flags >> 1) & 0x3; /*fprintf(stderr, "lacing: %x\n", lacing);*/ @@ -2050,6 +2050,13 @@ static int parse_block (demux_matroska_t *this, size_t block_size, } /* send each frame to the decoder */ for (i = 0; i <= lace_num; i++) { + + if (headers_len) { + data -= headers_len; + xine_fast_memcpy(data, track->compress_settings, headers_len); + frame[i] += headers_len; + } + if (track->handle_content != NULL) { track->handle_content((demux_plugin_t *)this, track, decoder_flags, @@ -2071,7 +2078,6 @@ static int parse_block (demux_matroska_t *this, size_t block_size, static int parse_simpleblock(demux_matroska_t *this, size_t block_len, uint64_t cluster_timecode, uint64_t block_duration) { - int has_block = 0; off_t block_pos = 0; off_t file_len = 0; int normpos = 0; @@ -2086,7 +2092,6 @@ static int parse_simpleblock(demux_matroska_t *this, size_t block_len, uint64_t if (!read_block_data(this, block_len, this->compress_maxlen)) return 0; - has_block = 1; /* we have the duration, we can parse the block now */ if (!parse_block(this, block_len, cluster_timecode, block_duration, normpos, is_key)) |