aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/mov.c
diff options
context:
space:
mode:
authorBaptiste Coudurier <baptiste.coudurier@gmail.com>2006-10-20 13:06:50 +0000
committerBaptiste Coudurier <baptiste.coudurier@gmail.com>2006-10-20 13:06:50 +0000
commitd966b2f0dba6f3e164c2b9faf22cfbf635cf951d (patch)
tree0aa8768952cff64e6f019df9f363bebb20d28d41 /libavformat/mov.c
parent864bc9656b14d68e3ac9fac550bbc5368b106de0 (diff)
downloadffmpeg-d966b2f0dba6f3e164c2b9faf22cfbf635cf951d.tar.gz
warn about zlib support needed if file has compressed moov atom
Originally committed as revision 6747 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/mov.c')
-rw-r--r--libavformat/mov.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/libavformat/mov.c b/libavformat/mov.c
index 0f3720a01c..3da82a6c10 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -1344,10 +1344,9 @@ static int mov_read_wide(MOVContext *c, ByteIOContext *pb, MOV_atom_t atom)
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 @@ static int mov_read_cmov(MOVContext *c, ByteIOContext *pb, MOV_atom_t atom)
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
+}
/* edit list atom */
static int mov_read_elst(MOVContext *c, ByteIOContext *pb, MOV_atom_t atom)
@@ -1487,11 +1488,7 @@ static const MOVParseTableEntry mov_default_parse_table[] = {
{ 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 }
};