[FFmpeg-devel] [PATCH] ffmpeg_sched: return better error code

Gyan Doshi ffmpeg at gyani.pro
Sat Dec 21 06:25:25 EET 2024


The existing code of 'No space left on device' leaves end users confused
since the issue isn't of disk space.
---
 fftools/ffmpeg_sched.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fftools/ffmpeg_sched.c b/fftools/ffmpeg_sched.c
index 420d3f9ce9..e6d22063d7 100644
--- a/fftools/ffmpeg_sched.c
+++ b/fftools/ffmpeg_sched.c
@@ -1836,7 +1836,7 @@ static int mux_queue_packet(SchMux *mux, SchMuxStream *ms, AVPacket *pkt)
         if (new_size <= packets) {
             av_log(mux, AV_LOG_ERROR,
                    "Too many packets buffered for output stream.\n");
-            return AVERROR(ENOSPC);
+            return AVERROR_BUFFER_TOO_SMALL;
         }
         ret = av_fifo_grow2(q->fifo, new_size - packets);
         if (ret < 0)
-- 
2.46.1



More information about the ffmpeg-devel mailing list