avformat/mov: return correct value in mov_read_cmov

On some failure paths, the error code is not correctly set.

Signed-off-by: Pan Bian <bianpan2016@163.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
pull/272/head
Pan Bian 7 years ago committed by Michael Niedermayer
parent 3f81259f33
commit f63450c8e4
  1. 1
      libavformat/mov.c

@ -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)

Loading…
Cancel
Save