aboutsummaryrefslogtreecommitdiff
path: root/libavformat/matroskadec.c
diff options
context:
space:
mode:
authorDiego Biurrun2012-10-18 19:48:27 +0200
committerDiego Biurrun2012-10-25 11:49:49 +0200
commit2a91ada8282f18d2807abee5188225bba1b19bda (patch)
tree4af1038566cd7410291905b6acb15a93a2f4aadc /libavformat/matroskadec.c
parent5bac2d0c3020587a03cb14e8b6a664a0b92f26c2 (diff)
avutil: Make LZO decoder code configure-time selectable
Diffstat (limited to 'libavformat/matroskadec.c')
-rw-r--r--libavformat/matroskadec.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/libavformat/matroskadec.c b/libavformat/matroskadec.c
index 68c936c15a..26f8707e83 100644
--- a/libavformat/matroskadec.c
+++ b/libavformat/matroskadec.c
@@ -1011,6 +1011,7 @@ static int matroska_decode_buffer(uint8_t** buf, int* buf_size,
memcpy(pkt_data + header_size, data, isize);
break;
}
+#if CONFIG_LZO
case MATROSKA_TRACK_ENCODING_COMP_LZO:
do {
olen = pkt_size *= 3;
@@ -1028,6 +1029,7 @@ static int matroska_decode_buffer(uint8_t** buf, int* buf_size,
}
pkt_size -= olen;
break;
+#endif
#if CONFIG_ZLIB
case MATROSKA_TRACK_ENCODING_COMP_ZLIB: {
z_stream zstream = {0};
@@ -1436,14 +1438,17 @@ static int matroska_read_header(AVFormatContext *s)
"Multiple combined encodings not supported");
} else if (encodings_list->nb_elem == 1) {
if (encodings[0].type ||
- (encodings[0].compression.algo != MATROSKA_TRACK_ENCODING_COMP_HEADERSTRIP &&
+ (
#if CONFIG_ZLIB
encodings[0].compression.algo != MATROSKA_TRACK_ENCODING_COMP_ZLIB &&
#endif
#if CONFIG_BZLIB
encodings[0].compression.algo != MATROSKA_TRACK_ENCODING_COMP_BZLIB &&
#endif
- encodings[0].compression.algo != MATROSKA_TRACK_ENCODING_COMP_LZO)) {
+#if CONFIG_LZO
+ encodings[0].compression.algo != MATROSKA_TRACK_ENCODING_COMP_LZO &&
+#endif
+ encodings[0].compression.algo != MATROSKA_TRACK_ENCODING_COMP_HEADERSTRIP)) {
encodings[0].scope = 0;
av_log(matroska->ctx, AV_LOG_ERROR,
"Unsupported encoding type");