Commit a03d488a authored by Jacob Trimble's avatar Jacob Trimble Committed by Michael Niedermayer

avformat/mov: Propagate errors in mov_switch_root.

Signed-off-by: 's avatarJacob Trimble <modmaker@google.com>
Signed-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 2d9cf3bf)
Signed-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
parent c09c0ce3
...@@ -5670,6 +5670,7 @@ static int should_retry(AVIOContext *pb, int error_code) { ...@@ -5670,6 +5670,7 @@ static int should_retry(AVIOContext *pb, int error_code) {
static int mov_switch_root(AVFormatContext *s, int64_t target) static int mov_switch_root(AVFormatContext *s, int64_t target)
{ {
int ret;
MOVContext *mov = s->priv_data; MOVContext *mov = s->priv_data;
int i, j; int i, j;
int already_read = 0; int already_read = 0;
...@@ -5706,8 +5707,10 @@ static int mov_switch_root(AVFormatContext *s, int64_t target) ...@@ -5706,8 +5707,10 @@ static int mov_switch_root(AVFormatContext *s, int64_t target)
mov->found_mdat = 0; mov->found_mdat = 0;
if (mov_read_default(mov, s->pb, (MOVAtom){ AV_RL32("root"), INT64_MAX }) < 0 || ret = mov_read_default(mov, s->pb, (MOVAtom){ AV_RL32("root"), INT64_MAX });
avio_feof(s->pb)) if (ret < 0)
return ret;
if (avio_feof(s->pb))
return AVERROR_EOF; return AVERROR_EOF;
av_log(s, AV_LOG_TRACE, "read fragments, offset 0x%"PRIx64"\n", avio_tell(s->pb)); av_log(s, AV_LOG_TRACE, "read fragments, offset 0x%"PRIx64"\n", avio_tell(s->pb));
......
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