tis 2024-10-29 klockan 15:43 +0100 skrev Tomas Härdin:
> Hi
> 
> This is a set of patches that Spotify wants upstreamed, based on
> n6.0.1. I have rebased all of them except except "[PATCH 03/18]
> fftools/ffmpeg: Always exit_program(1) for I/O-errors" 

Update on this part: AVERROR(EIO) is already handled by master so I
think it's safe to drop this particular patch. Attached anyway if
anyone was curious what it looked like

/Tomas

From 90c79e3678d4e4d3de1fb23988c3b2d083be85b2 Mon Sep 17 00:00:00 2001
From: Ulrik <ulr...@spotify.com>
Date: Mon, 27 Jul 2020 11:51:52 +0200
Subject: [PATCH 03/18] fftools/ffmpeg: Always exit_program(1) for I/O-errors

Currently, a read-error (I.E. broken filesystem or prematurely closed HTTP
connection) is ignored, leading to the same "content"-error as if the file
was really cut short.

This patch changes that behavior, to look for underlying I/O-errors
and propagate them as an explicit processing failure.
---
 fftools/ffmpeg.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/fftools/ffmpeg.c b/fftools/ffmpeg.c
index c819d30ca5..7893c52c0c 100644
--- a/fftools/ffmpeg.c
+++ b/fftools/ffmpeg.c
@@ -3782,6 +3782,11 @@ static int process_input(int file_index)
         decode_flush(ifile);
         return AVERROR(EAGAIN);
     }
+    // exit with error if there were io errors
+    if (is->pb && is->pb->error == AVERROR(EIO)) {
+        print_error(is->url, is->pb->error);
+        exit_program(1);
+    }
     if (ret < 0) {
         if (ret != AVERROR_EOF) {
             print_error(is->url, ret);
-- 
2.44.0

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to