# HG changeset patch # User bcoudurier # Date 1161349610 0 # Node ID 53803884feb7ae62c03a3363407a279bea5f57ca # Parent 1973528c69753478c7b2767f19ba04976533fc8d warn about zlib support needed if file has compressed moov atom diff -r 1973528c6975 -r 53803884feb7 mov.c --- a/mov.c Fri Oct 20 09:32:48 2006 +0000 +++ b/mov.c Fri Oct 20 13:06:50 2006 +0000 @@ -1344,10 +1344,9 @@ return err; } - -#ifdef CONFIG_ZLIB static int mov_read_cmov(MOVContext *c, ByteIOContext *pb, MOV_atom_t atom) { +#ifdef CONFIG_ZLIB ByteIOContext ctx; uint8_t *cmov_data; uint8_t *moov_data; /* uncompressed data */ @@ -1389,10 +1388,12 @@ ret = mov_read_default(c, &ctx, atom); av_free(moov_data); av_free(cmov_data); - return ret; +#else + av_log(c->fc, AV_LOG_ERROR, "this file requires zlib support compiled in\n"); + return -1; +#endif } -#endif /* edit list atom */ static int mov_read_elst(MOVContext *c, ByteIOContext *pb, MOV_atom_t atom) @@ -1487,11 +1488,7 @@ { MKTAG( 't', 'c', 'm', 'd' ), mov_read_leaf }, { MKTAG( 'w', 'i', 'd', 'e' ), mov_read_wide }, /* place holder */ //{ MKTAG( 'r', 'm', 'q', 'u' ), mov_read_leaf }, -#ifdef CONFIG_ZLIB { MKTAG( 'c', 'm', 'o', 'v' ), mov_read_cmov }, -#else -{ MKTAG( 'c', 'm', 'o', 'v' ), mov_read_leaf }, -#endif { 0L, mov_read_leaf } };