Commit 35eeedcf authored by bcoudurier's avatar bcoudurier

warn about zlib support needed if file has compressed moov atom

git-svn-id: file:///var/local/repositories/ffmpeg/trunk@6747 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent ae1b25a5
...@@ -1344,10 +1344,9 @@ static int mov_read_wide(MOVContext *c, ByteIOContext *pb, MOV_atom_t atom) ...@@ -1344,10 +1344,9 @@ static int mov_read_wide(MOVContext *c, ByteIOContext *pb, MOV_atom_t atom)
return err; return err;
} }
#ifdef CONFIG_ZLIB
static int mov_read_cmov(MOVContext *c, ByteIOContext *pb, MOV_atom_t atom) static int mov_read_cmov(MOVContext *c, ByteIOContext *pb, MOV_atom_t atom)
{ {
#ifdef CONFIG_ZLIB
ByteIOContext ctx; ByteIOContext ctx;
uint8_t *cmov_data; uint8_t *cmov_data;
uint8_t *moov_data; /* uncompressed data */ uint8_t *moov_data; /* uncompressed data */
...@@ -1389,10 +1388,12 @@ static int mov_read_cmov(MOVContext *c, ByteIOContext *pb, MOV_atom_t atom) ...@@ -1389,10 +1388,12 @@ static int mov_read_cmov(MOVContext *c, ByteIOContext *pb, MOV_atom_t atom)
ret = mov_read_default(c, &ctx, atom); ret = mov_read_default(c, &ctx, atom);
av_free(moov_data); av_free(moov_data);
av_free(cmov_data); av_free(cmov_data);
return ret; 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 */ /* edit list atom */
static int mov_read_elst(MOVContext *c, ByteIOContext *pb, MOV_atom_t 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[] = { ...@@ -1487,11 +1488,7 @@ static const MOVParseTableEntry mov_default_parse_table[] = {
{ MKTAG( 't', 'c', 'm', 'd' ), mov_read_leaf }, { MKTAG( 't', 'c', 'm', 'd' ), mov_read_leaf },
{ MKTAG( 'w', 'i', 'd', 'e' ), mov_read_wide }, /* place holder */ { MKTAG( 'w', 'i', 'd', 'e' ), mov_read_wide }, /* place holder */
//{ MKTAG( 'r', 'm', 'q', 'u' ), mov_read_leaf }, //{ MKTAG( 'r', 'm', 'q', 'u' ), mov_read_leaf },
#ifdef CONFIG_ZLIB
{ MKTAG( 'c', 'm', 'o', 'v' ), mov_read_cmov }, { MKTAG( 'c', 'm', 'o', 'v' ), mov_read_cmov },
#else
{ MKTAG( 'c', 'm', 'o', 'v' ), mov_read_leaf },
#endif
{ 0L, mov_read_leaf } { 0L, mov_read_leaf }
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment