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 98D7849FFD for ; Tue, 16 Jul 2024 18:16:09 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 0621968DB5D; Tue, 16 Jul 2024 21:14:27 +0300 (EEST) Received: from mail1.khirnov.net (quelana.khirnov.net [94.230.150.81]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id B4DEB68D8D0 for ; Tue, 16 Jul 2024 21:14:04 +0300 (EEST) 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=fmCO6BZU; dkim-atps=neutral Received: from localhost (mail1.khirnov.net [IPv6:::1]) by mail1.khirnov.net (Postfix) with ESMTP id 060A64E2B for ; Tue, 16 Jul 2024 19:24:20 +0200 (CEST) Received: from mail1.khirnov.net ([IPv6:::1]) by localhost (mail1.khirnov.net [IPv6:::1]) (amavis, port 10024) with ESMTP id 5hwGk0pS0u3f for ; Tue, 16 Jul 2024 19:24:19 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=khirnov.net; s=mail; t=1721150659; bh=1PoTdoaSKlxqFW/fFLQIizduy4qpxKJ7LD5ExxWb5sk=; h=From:To:Subject:Date:In-Reply-To:References:From; b=fmCO6BZUAaYusQSiWXccja+A4BvbRfap1FTcknf00DmkewqDjmBk2JTRndwqwkr8m c0qh1BCkpIvAZx65pZRKNcBVvDMaq4Pynlk8xyyDeZm9o8YRTEyZWbOBL+0cDEPmOK THYqteiz85L0dhaehRCReWbBZvGf73SE3JqM1N3D5pMcE+N+ozuw8eduqQ/9aw0Q9x K0BOKBi6rVpzL0oFoZ0LNsgpfVObUoQ5XAW0UEnpuaSJkrfQ8zTB4VoCGLuaH4Yp8W vaO7r2DgmcmiHxEiGttlosiS9j2cvA602fD6M6Z/Pk1Wy1qmn9FbBDMwutenjGBwj+ DjisTJxnFNMOQ== 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 35B7C4DF4 for ; Tue, 16 Jul 2024 19:24:19 +0200 (CEST) Received: from libav.khirnov.net (libav.khirnov.net [IPv6:::1]) by libav.khirnov.net (Postfix) with ESMTP id A79503A2F6A for ; Tue, 16 Jul 2024 19:16:21 +0200 (CEST) From: Anton Khirnov To: ffmpeg-devel@ffmpeg.org Date: Tue, 16 Jul 2024 19:11:47 +0200 Message-ID: <20240716171155.31838-32-anton@khirnov.net> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240716171155.31838-1-anton@khirnov.net> References: <20240716171155.31838-1-anton@khirnov.net> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 32/39] lavc/decode: reindent 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: --- libavcodec/decode.c | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/libavcodec/decode.c b/libavcodec/decode.c index b17cfba26f..42cee77ec5 100644 --- a/libavcodec/decode.c +++ b/libavcodec/decode.c @@ -614,21 +614,21 @@ static int decode_receive_frame_internal(AVCodecContext *avctx, AVFrame *frame) if (codec->cb_type == FF_CODEC_CB_TYPE_RECEIVE_FRAME) { while (1) { - frame->pict_type = dc->initial_pict_type; - frame->flags |= dc->intra_only_flag; - ret = codec->cb.receive_frame(avctx, frame); - emms_c(); - if (!ret) { - if (avctx->codec->type == AVMEDIA_TYPE_AUDIO) { - int64_t discarded_samples = 0; - ret = discard_samples(avctx, frame, &discarded_samples); + frame->pict_type = dc->initial_pict_type; + frame->flags |= dc->intra_only_flag; + ret = codec->cb.receive_frame(avctx, frame); + emms_c(); + if (!ret) { + if (avctx->codec->type == AVMEDIA_TYPE_AUDIO) { + int64_t discarded_samples = 0; + ret = discard_samples(avctx, frame, &discarded_samples); + } + if (ret == AVERROR(EAGAIN) || (frame->flags & AV_FRAME_FLAG_DISCARD)) { + av_frame_unref(frame); + continue; + } } - if (ret == AVERROR(EAGAIN) || (frame->flags & AV_FRAME_FLAG_DISCARD)) { - av_frame_unref(frame); - continue; - } - } - break; + break; } } else ret = decode_simple_receive_frame(avctx, frame); -- 2.43.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".