From patchwork Wed Sep 28 18:29:01 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jon Toohill X-Patchwork-Id: 768 Delivered-To: ffmpegpatchwork@gmail.com Received: by 10.103.140.66 with SMTP id o63csp563168vsd; Wed, 28 Sep 2016 11:30:01 -0700 (PDT) X-Received: by 10.28.167.204 with SMTP id q195mr9881341wme.76.1475087401417; Wed, 28 Sep 2016 11:30:01 -0700 (PDT) Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id g4si21383633wma.20.2016.09.28.11.29.56; Wed, 28 Sep 2016 11:30:01 -0700 (PDT) Received-SPF: pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) client-ip=79.124.17.100; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@google.com; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id AA16968991F; Wed, 28 Sep 2016 21:29:19 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-pf0-f181.google.com (mail-pf0-f181.google.com [209.85.192.181]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 60C1068991F for ; Wed, 28 Sep 2016 21:29:12 +0300 (EEST) Received: by mail-pf0-f181.google.com with SMTP id q2so19945439pfj.3 for ; Wed, 28 Sep 2016 11:29:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=P1pPW5v3GM7T2piJI+KMfASWCQ2TABpizTXiv/Yf+5c=; b=QVkqirNFgwb0BEVWxF78WnLhmik5QVil24XzJyJtEpK7fBQv1Xy6dq5f3Y8rBevD/Y +Ldk6yxgbq6KW/RkZPWTr3ZOQXdEPEfZ6TUWiBdO0wKt0AeCbsFGCzcoSDHCPa868fs8 Wqj6jme/osAea42eB4ijl59Xj9IfWBKoIx35cPYVv6ci6cu3jiNkEtT4z/NUEIerepX9 H6joqeU7rVjLjzYFlV0odHANbg7vLjgitpuHGLjCHe/jCDWGnGTe1wePVbKLe2yPl9xf zlFYOUSDZS9y8teEtbjRmZWSddXrNa6/AoDYq1IMbxld7lXm+rcMC/TzZa+a388S0L0G 0VZQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=P1pPW5v3GM7T2piJI+KMfASWCQ2TABpizTXiv/Yf+5c=; b=bPXaFHgokPzqJWBz4UX+GVBIRt4djZC4p5VFKGEvAdRFPjRE2bL8zrls/w3CtFWGGP uDGns6WsVYztSUKc4lxPKv8zMeWPZjfbWr11yTX2SvJjDjunUaNELb/+TlFeIyvCDaDr cVSGFij4bZjhcUHig53PVapBz+G50p1TpAnGif1uJx4VG6187EgF/nX1LFJbnXLa8sX0 4hCz4T0RnUxf7XkKI0c/AuyiiK+Z/wsQctzZHkzlYvvWiVIk8mB364U25zTDyQb0cLj9 Ukk5MMGdzAcJC1193kfI9xoWiyqoeCg0d79jruRyDulge2T/XAA+lA16RweO7Od+P5KM 1sLA== X-Gm-Message-State: AE9vXwNcTyFbaLZyocmF+QzfqaPtXKV7KI9RJis7pLYfeA5C2kU272r9SLbSu2wXGA9iSpf1 X-Received: by 10.98.10.93 with SMTP id s90mr60422178pfi.45.1475087363007; Wed, 28 Sep 2016 11:29:23 -0700 (PDT) Received: from mungolini.mtv.corp.google.com ([100.96.2.73]) by smtp.gmail.com with ESMTPSA id wa9sm14248493pac.35.2016.09.28.11.29.22 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 28 Sep 2016 11:29:22 -0700 (PDT) From: Jon Toohill To: ffmpeg-devel@ffmpeg.org Date: Wed, 28 Sep 2016 11:29:01 -0700 Message-Id: <1475087343-29745-4-git-send-email-jtoohill@google.com> X-Mailer: git-send-email 2.8.0.rc3.226.g39d4020 In-Reply-To: <1475087343-29745-1-git-send-email-jtoohill@google.com> References: <1475087343-29745-1-git-send-email-jtoohill@google.com> Subject: [FFmpeg-devel] [PATCH 2/4] lavc/libmp3lame: set trailing_padding after flushing encoder X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.20 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 Cc: Jon Toohill MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" --- libavcodec/libmp3lame.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libavcodec/libmp3lame.c b/libavcodec/libmp3lame.c index 5642264..1566921 100644 --- a/libavcodec/libmp3lame.c +++ b/libavcodec/libmp3lame.c @@ -218,6 +218,7 @@ static int mp3lame_encode_frame(AVCodecContext *avctx, AVPacket *avpkt, } else { lame_result = lame_encode_flush(s->gfp, s->buffer + s->buffer_index, s->buffer_size - s->buffer_index); + avctx->trailing_padding = FFMAX(lame_get_encoder_padding(s->gfp) - 528 - 1, 0); } if (lame_result < 0) { if (lame_result == -1) {