Mercurial > mplayer.hg
comparison libmpdemux/demux_mkv.c @ 34398:9120eb514454
Add support of compression algorithm 3 (header stripping) in mkv demuxer.
Patch by Alexander Beregalov (a.beregalov gmail).
author | iive |
---|---|
date | Mon, 02 Jan 2012 12:53:20 +0000 |
parents | e9a733c1e2a1 |
children | 34c05e3ea263 |
comparison
equal
deleted
inserted
replaced
34397:5d6f6e30e1cc | 34398:9120eb514454 |
---|---|
378 goto lzo_fail; | 378 goto lzo_fail; |
379 dstlen *= 2; | 379 dstlen *= 2; |
380 } | 380 } |
381 *size = dstlen - out_avail; | 381 *size = dstlen - out_avail; |
382 } | 382 } |
383 else if (track->encodings[i].comp_algo == 3) | |
384 { | |
385 *dest = malloc (*size + track->encodings[i].comp_settings_len); | |
386 memcpy(*dest, track->encodings[i].comp_settings, | |
387 track->encodings[i].comp_settings_len); | |
388 memcpy(*dest + track->encodings[i].comp_settings_len, src, *size); | |
389 *size += track->encodings[i].comp_settings_len; | |
390 modified = 1; | |
391 } | |
383 } | 392 } |
384 | 393 |
385 return modified; | 394 return modified; |
386 } | 395 } |
387 | 396 |
540 mp_msg(MSGT_DEMUX, MSGL_WARN, | 549 mp_msg(MSGT_DEMUX, MSGL_WARN, |
541 MSGTR_MPDEMUX_MKV_UnknownContentEncoding, | 550 MSGTR_MPDEMUX_MKV_UnknownContentEncoding, |
542 track->tnum); | 551 track->tnum); |
543 } | 552 } |
544 | 553 |
545 if (e.comp_algo != 0 && e.comp_algo != 2) { | 554 if (e.comp_algo != 0 && e.comp_algo != 2 && e.comp_algo != 3) { |
546 mp_msg(MSGT_DEMUX, MSGL_WARN, | 555 mp_msg(MSGT_DEMUX, MSGL_WARN, |
547 MSGTR_MPDEMUX_MKV_UnknownCompression, | 556 MSGTR_MPDEMUX_MKV_UnknownCompression, |
548 track->tnum, e.comp_algo); | 557 track->tnum, e.comp_algo); |
549 } | 558 } |
550 #if !CONFIG_ZLIB | 559 #if !CONFIG_ZLIB |