diff mbox series

[FFmpeg-devel,PATCHv2] avformat/mov: Properly forward error codes from av_seek

Message ID 20210325163542.451203-1-derek.buitenhuis@gmail.com
State Accepted
Commit f404a2716a61631594891cfd10c30f2da234672f
Headers show
Series [FFmpeg-devel,PATCHv2] avformat/mov: Properly forward error codes from av_seek
Related show

Checks

Context Check Description
andriy/x86_make success Make finished
andriy/x86_make_fate success Make fate finished
andriy/PPC64_make success Make finished
andriy/PPC64_make_fate success Make fate finished

Commit Message

Derek Buitenhuis March 25, 2021, 4:35 p.m. UTC
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>
---
Sent the wrong version the first time, woops.
---
 libavformat/mov.c | 2 ++
 1 file changed, 2 insertions(+)

Comments

Derek Buitenhuis March 26, 2021, 12:14 p.m. UTC | #1
On 25/03/2021 16:35, Derek Buitenhuis wrote:
> 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>
> ---

Will push tonight if there are no objections.

- Derek
diff mbox series

Patch

diff --git a/libavformat/mov.c b/libavformat/mov.c
index aef5517c2c..f12f174924 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;
         }