Browse Source

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 2d9cf3bf16)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
tags/n3.2.10
Jacob Trimble Michael Niedermayer 8 years ago
parent
commit
a03d488ae2
1 changed files with 5 additions and 2 deletions
  1. +5
    -2
      libavformat/mov.c

+ 5
- 2
libavformat/mov.c View File

@@ -5670,6 +5670,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;
@@ -5706,8 +5707,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));



Loading…
Cancel
Save