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 B3DE145967 for ; Sat, 25 Feb 2023 15:25:30 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id D285268BD9B; Sat, 25 Feb 2023 17:25:26 +0200 (EET) Received: from mail-wr1-f41.google.com (mail-wr1-f41.google.com [209.85.221.41]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id A496168BD1D for ; Sat, 25 Feb 2023 17:25:20 +0200 (EET) Received: by mail-wr1-f41.google.com with SMTP id l1so2027261wry.10 for ; Sat, 25 Feb 2023 07:25:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=VoYLXGu7n79NatQ8lZQ9GUgNbJQ2MZ8sBYCmDm9K6Y8=; b=Ax4jLGu0h+eGQld//VzBnQcvzXPIxdXjhBcKjvs/otU1uvNO4em/MJJ7AXrn5A1d2L xE18Ve2pDPoHTcN9TMgXeNVrRYVUobtNCBauUZOFTPtQhyOjby1f2ibghVUxuVJZQKiq sz0fWLPge6JIcfm4+VqCQvrXcRtMD3+vQ9dMRBIXJ0YBzqA46sSTncjZuVdSTTK0bmJc i1oiE47Of7u2KvonB3zPZrKp+WUvvmNU+4MHrswcyq6a76lLSBsQZqv99tzCOiJLyUwu 20UplfIYbOuJYkJ4LLxhWdQI0tmoSjWycQSsi5Fagz+VjTZ3OSZ7KDkbDoWEk5RAWRX8 +Lcw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=VoYLXGu7n79NatQ8lZQ9GUgNbJQ2MZ8sBYCmDm9K6Y8=; b=ic9TiXGLbhQyd+Fl6WlRalKT8fHB8Gy8BeW9zY2SW2c/EEGoBtgGNToV3g69T9QboW 8BDEgp2EpgmtUfwQ4lMBBlpCdXj+YTcRdfltMykV3a9O9SxW+KHtfDT3hEuGugYrOZwb Bj0J9hVnm2rQ6a+Qv2avesFUDFbsyjS4RYRo4ckWH9kaPzbtnk3tAtcXHLsOEpNy8PL8 OlYZruciMJVUYeimbuFiy6gBMXJ8UdrRwZ3AEfMnu8FFPUp1OLAsb5zbc93oc05lIPnp KIAhlI3gK4+n8u3JSdbyM7Go3fVUV5He0Y0TWjTUKxXQoICvqT8jai775N+M7Yf3KdhL 6Buw== X-Gm-Message-State: AO0yUKUMPesq5gPPXbOs/XQfQd6T9zDYiaiWAAZQg9my6hb/SqTwaaRJ b4TImdNodB/5KXK3ZT4n24Uxf0O1+yTYag== X-Google-Smtp-Source: AK7set+LEN+vagLE+2vvkyNJRfxhgeRbL4LSpeLiGqtg5fo0xeN5RvqFw3p1/8RT8Qzc3cMyZ6kssQ== X-Received: by 2002:a5d:6808:0:b0:2c5:7eb5:9799 with SMTP id w8-20020a5d6808000000b002c57eb59799mr17342162wru.36.1677338719570; Sat, 25 Feb 2023 07:25:19 -0800 (PST) Received: from localhost.localdomain ([49.51.162.193]) by smtp.gmail.com with ESMTPSA id d8-20020a05600c34c800b003dc4480df80sm7122918wmq.34.2023.02.25.07.25.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 25 Feb 2023 07:25:19 -0800 (PST) From: Jun Zhao To: ffmpeg-devel@ffmpeg.org Date: Sat, 25 Feb 2023 23:25:08 +0800 Message-Id: <20230225152509.3086288-1-mypopydev@gmail.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 1/2] doc/examples/muxing: Remove unnecessary ret 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 Cc: Jun Zhao 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: From: Jun Zhao Remove unnecessary ret and make the code more compact Signed-off-by: Jun Zhao --- doc/examples/muxing.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/doc/examples/muxing.c b/doc/examples/muxing.c index 3acb778322..cd997d5431 100644 --- a/doc/examples/muxing.c +++ b/doc/examples/muxing.c @@ -219,8 +219,6 @@ static AVFrame *alloc_audio_frame(enum AVSampleFormat sample_fmt, int sample_rate, int nb_samples) { AVFrame *frame = av_frame_alloc(); - int ret; - if (!frame) { fprintf(stderr, "Error allocating an audio frame\n"); exit(1); @@ -232,8 +230,7 @@ static AVFrame *alloc_audio_frame(enum AVSampleFormat sample_fmt, frame->nb_samples = nb_samples; if (nb_samples) { - ret = av_frame_get_buffer(frame, 0); - if (ret < 0) { + if (av_frame_get_buffer(frame, 0) < 0) { fprintf(stderr, "Error allocating an audio buffer\n"); exit(1); } -- 2.25.1 _______________________________________________ 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".