aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat
diff options
context:
space:
mode:
authorDerek Buitenhuis <derek.buitenhuis@gmail.com>2021-03-25 16:29:16 +0000
committerDerek Buitenhuis <derek.buitenhuis@gmail.com>2021-03-26 20:04:12 +0000
commitf404a2716a61631594891cfd10c30f2da234672f (patch)
tree7e475ece5fca3b0dc1da5f3c0c5fda03007a1bbc /libavformat
parent896395bbcf0bcfe83b6d54ecafcf44272ee8f3a5 (diff)
downloadffmpeg-f404a2716a61631594891cfd10c30f2da234672f.tar.gz
avformat/mov: Properly forward error codes from av_seek
This is important, for example, for connection timed out events, when used over a network, returning AVERROR(ETIMEDOUT). Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
Diffstat (limited to 'libavformat')
-rw-r--r--libavformat/mov.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libavformat/mov.c b/libavformat/mov.c
index b90cec7173..cb818ebe0e 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -7947,6 +7947,8 @@ static int mov_read_packet(AVFormatContext *s, AVPacket *pkt)
sc->ffindex, sample->pos);
if (should_retry(sc->pb, ret64)) {
mov_current_sample_dec(sc);
+ } else if (ret64 < 0) {
+ return (int)ret64;
}
return AVERROR_INVALIDDATA;
}