[FFmpeg-cvslog] avformat/mov: Propagate errors in mov_switch_root.
Jacob Trimble
git at videolan.org
Tue Jan 9 02:27:57 EET 2018
ffmpeg | branch: release/3.2 | Jacob Trimble <modmaker-at-google.com at ffmpeg.org> | Mon Nov 20 12:05:02 2017 -0800| [a03d488ae2e444847b64863ec3e3813465beaecc] | committer: Michael Niedermayer
avformat/mov: Propagate errors in mov_switch_root.
Signed-off-by: Jacob Trimble <modmaker at google.com>
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
(cherry picked from commit 2d9cf3bf16b94cd9db10dabad695c69c5cff4f58)
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=a03d488ae2e444847b64863ec3e3813465beaecc
---
libavformat/mov.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/libavformat/mov.c b/libavformat/mov.c
index 7547c78957..7c245d14ee 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -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));
More information about the ffmpeg-cvslog
mailing list