From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTP id B03444910A for ; Sat, 3 Feb 2024 20:40:05 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id D494568D152; Sat, 3 Feb 2024 22:40:02 +0200 (EET) Received: from mail1.khirnov.net (quelana.khirnov.net [94.230.150.81]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id E8A8468D139 for ; Sat, 3 Feb 2024 22:39:55 +0200 (EET) Authentication-Results: mail1.khirnov.net; dkim=pass (2048-bit key; unprotected) header.d=khirnov.net header.i=@khirnov.net header.a=rsa-sha256 header.s=mail header.b=Tj2ctT06; dkim-atps=neutral Received: from localhost (mail1.khirnov.net [IPv6:::1]) by mail1.khirnov.net (Postfix) with ESMTP id 0BFEE444E for ; Sat, 3 Feb 2024 21:39:55 +0100 (CET) Received: from mail1.khirnov.net ([IPv6:::1]) by localhost (mail1.khirnov.net [IPv6:::1]) (amavis, port 10024) with ESMTP id rZV_5Qj9Wo-4 for ; Sat, 3 Feb 2024 21:39:54 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=khirnov.net; s=mail; t=1706992793; bh=naa64szGVLE5usgaUtIMSxnqWtYp1nqorP61WAYjGYA=; h=From:To:Subject:Date:From; b=Tj2ctT06qxjOjqurX2apVydbw2RelMuVhYCbELJUUbPNlHqSvgf+azD38t8qlPE/e HmvSu66v+b3jO3zbcOtK0ckYuhLNag4kuBCVsbzaXS/dWfy0QFFYoU+s5qU/aKSVzl eNwiRWNbGp1hZRQaCiWtgeErUWAUrtg6kwrQCn7AxH51hxcFOmdIWZ4q8NMC43DUF4 wzQEqNhn+dAiJTiK85CL/YvjWWZ6KLyPItLJiKWbj+fMxQchtTCy371ekOXcn/BnX/ C19tm0YNQAU2qb8LdJ4VLXYT3Kv4ki0+DCxerindSfKNGpiJR5/cMAbmBv6HawHYrW HSa3qCvbtxOtQ== Received: from libav.khirnov.net (libav.khirnov.net [IPv6:2a00:c500:561:201::7]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "libav.khirnov.net", Issuer "smtp.khirnov.net SMTP CA" (verified OK)) by mail1.khirnov.net (Postfix) with ESMTPS id F1CB081C for ; Sat, 3 Feb 2024 21:39:53 +0100 (CET) Received: from libav.khirnov.net (libav.khirnov.net [IPv6:::1]) by libav.khirnov.net (Postfix) with ESMTP id CC6CB3A0435 for ; Sat, 3 Feb 2024 21:39:53 +0100 (CET) From: Anton Khirnov To: ffmpeg-devel@ffmpeg.org Date: Sat, 3 Feb 2024 21:39:49 +0100 Message-ID: <20240203203950.20254-1-anton@khirnov.net> X-Mailer: git-send-email 2.42.0 MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 1/2] fftools/ffmpeg_mux: fix terminating muxer on streamcopy with -t X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: Reported-by: Andreas Rheinhardt --- fftools/ffmpeg_mux.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fftools/ffmpeg_mux.c b/fftools/ffmpeg_mux.c index ab86abee14..962d0b2882 100644 --- a/fftools/ffmpeg_mux.c +++ b/fftools/ffmpeg_mux.c @@ -300,6 +300,7 @@ static int mux_packet_filter(Muxer *mux, MuxThreadContext *mt, av_packet_unref(pkt); pkt = NULL; ret = 0; + *stream_eof = 1; } else if (ret < 0) goto fail; } @@ -352,14 +353,13 @@ static int mux_packet_filter(Muxer *mux, MuxThreadContext *mt, goto mux_fail; } *stream_eof = 1; - return AVERROR_EOF; } else { ret = sync_queue_process(mux, ms, pkt, stream_eof); if (ret < 0) goto mux_fail; } - return 0; + return *stream_eof ? AVERROR_EOF : 0; mux_fail: err_msg = "submitting a packet to the muxer"; -- 2.42.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-request@ffmpeg.org with subject "unsubscribe".