diff options
author | Jacob Trimble <[email protected]> | 2017-11-20 12:05:02 -0800 |
---|---|---|
committer | Michael Niedermayer <[email protected]> | 2017-12-07 23:38:06 +0100 |
commit | 8aabc4fdb56cdd10ddc61dca8a995795721182f0 (patch) | |
tree | 5b1ea744db12661f07fe3ee8cdf50cf4e2758315 | |
parent | 2e58db3db00bca0e815c3f725fa1bb4eda918b19 (diff) |
avformat/mov: Propagate errors in mov_switch_root.
Signed-off-by: Jacob Trimble <[email protected]>
Signed-off-by: Michael Niedermayer <[email protected]>
(cherry picked from commit 2d9cf3bf16b94cd9db10dabad695c69c5cff4f58)
Signed-off-by: Michael Niedermayer <[email protected]>
-rw-r--r-- | libavformat/mov.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/libavformat/mov.c b/libavformat/mov.c index fc2d59b51a..5acac07d22 100644 --- a/libavformat/mov.c +++ b/libavformat/mov.c @@ -6418,6 +6418,7 @@ static int should_retry(AVIOContext *pb, int error_code) { static int mov_switch_root(AVFormatContext *s, int64_t target) { + int ret; MOVContext *mov = s->priv_data; int i, j; int already_read = 0; @@ -6454,8 +6455,10 @@ static int mov_switch_root(AVFormatContext *s, int64_t target) mov->found_mdat = 0; - if (mov_read_default(mov, s->pb, (MOVAtom){ AV_RL32("root"), INT64_MAX }) < 0 || - avio_feof(s->pb)) + ret = mov_read_default(mov, s->pb, (MOVAtom){ AV_RL32("root"), INT64_MAX }); + if (ret < 0) + return ret; + if (avio_feof(s->pb)) return AVERROR_EOF; av_log(s, AV_LOG_TRACE, "read fragments, offset 0x%"PRIx64"\n", avio_tell(s->pb)); |