[FFmpeg-cvslog] avformat/mov: Properly forward error codes from av_seek

Derek Buitenhuis git at videolan.org
Fri Mar 26 22:18:56 EET 2021


ffmpeg | branch: master | Derek Buitenhuis <derek.buitenhuis at gmail.com> | Thu Mar 25 16:29:16 2021 +0000| [f404a2716a61631594891cfd10c30f2da234672f] | committer: Derek Buitenhuis

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 at gmail.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=f404a2716a61631594891cfd10c30f2da234672f
---

 libavformat/mov.c | 2 ++
 1 file changed, 2 insertions(+)

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;
         }



More information about the ffmpeg-cvslog mailing list