aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat
diff options
context:
space:
mode:
authorJacob Trimble <modmaker-at-google.com@ffmpeg.org>2017-11-20 12:05:02 -0800
committerMichael Niedermayer <michael@niedermayer.cc>2017-12-02 00:28:59 +0100
commit20e78d53394fa56eb4bcb3be06ff70375a86dd94 (patch)
treeca5c0b8e170a1bf0ad43c9f304cfce94ac7bdbe1 /libavformat
parentbf44f250a2234d963489642eadcf32e79f9bb804 (diff)
downloadffmpeg-20e78d53394fa56eb4bcb3be06ff70375a86dd94.tar.gz
avformat/mov: Propagate errors in mov_switch_root.
Signed-off-by: Jacob Trimble <modmaker@google.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> (cherry picked from commit 2d9cf3bf16b94cd9db10dabad695c69c5cff4f58) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavformat')
-rw-r--r--libavformat/mov.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/libavformat/mov.c b/libavformat/mov.c
index 85bf2e5211..d41778cbed 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -4975,6 +4975,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;
@@ -5011,8 +5012,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));