Commit f63450c8 authored by Pan Bian's avatar Pan Bian Committed by Michael Niedermayer

avformat/mov: return correct value in mov_read_cmov

On some failure paths, the error code is not correctly set.
Signed-off-by: 's avatarPan Bian <bianpan2016@163.com>
Signed-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
parent 3f81259f
......@@ -4894,6 +4894,7 @@ static int mov_read_cmov(MOVContext *c, AVIOContext *pb, MOVAtom atom)
if (ret < 0)
goto free_and_return;
ret = AVERROR_INVALIDDATA;
if (uncompress (moov_data, (uLongf *) &moov_len, (const Bytef *)cmov_data, cmov_len) != Z_OK)
goto free_and_return;
if (ffio_init_context(&ctx, moov_data, moov_len, 0, NULL, NULL, NULL, NULL) != 0)
......
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