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 3C963407DB for ; Wed, 2 Mar 2022 14:05:56 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 7332268B2D1; Wed, 2 Mar 2022 16:05:54 +0200 (EET) Received: from mail-yw1-f177.google.com (mail-yw1-f177.google.com [209.85.128.177]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id C541468B1CE for ; Wed, 2 Mar 2022 16:05:47 +0200 (EET) Received: by mail-yw1-f177.google.com with SMTP id 00721157ae682-2dbc48104beso18621417b3.5 for ; Wed, 02 Mar 2022 06:05:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=ryMomNOr58d61CUoBPbPGRtNSuCU2vAv5XasimAIgmU=; b=ZJRwsI1Ei/gWxy578vMHyt85kcUYwqLq+lDKZXHElZ6lpL7D/nXWMelCK7k2bUCMwP lDczJQtXiTgDRyuSz8Mk7d6NRGxDG+0g9jYBGxfN9rerQP37YcGezrHS74shupC314lT YzUC2gam03+hMgFNa/hPsp51MJqJaYgjS5/c6WwAXwfG9iAgik1bbdcplKslo0X40BL0 zR4G6Lz2tq0OP7wynm0Xs48VrLiBMnKSG0z1mURJRiUhqc7qjWo/jviSivk17pj6LA1c C1sf9EUlBNQ+/HJCw4P9QzZPlBqh4gxjQAELFYZNTxGtmLK4r9NEHqCR2NY4fEofZqyh 4Emw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=ryMomNOr58d61CUoBPbPGRtNSuCU2vAv5XasimAIgmU=; b=pm2ZrwMjjeLpOrGV8edoZp7sAqDejHWQPFBSkAA8mSJswtsfQOyoJeUcytPTSXo9sB BxG+P7OsYvp9oSQYrEOkTQoJUumDl7CThrez2+7J2zY7tjCfnpIj3AcfeKK/2RZ4c9Yi vVL/dL4sSsKjQZ10fc0MESmzTtwYzcHD84euzbw7k/9IanSUaAzZ2dGwB+Vmnp7GvzCW JJj3MP+5YJ7ezLSDg0TvDx12F3fGZLEEsBGngIpx/gteyNTYCmij5TjCaejw438SExyq FXC3ylI9QfQiJqsekr05aQagZok9OW7gF+J9FBoAmdAu7tHNRW6pKl9F8btmxkFjI9EP XYYw== X-Gm-Message-State: AOAM5316iiFztzX/5S8EiP/qEOwAF2r9Hak9SdWRH6k32+AmAAMtrg6F AxVsYXhL1+KIBQyhzZKi+dW5UQDkaaPdrce4O3a23uGmMJw= X-Google-Smtp-Source: ABdhPJx+q2sOGMWGw+WIg46ujpv4QvZ0rLhusImsPoMhrza1fKDh1hyLskUyuOzz6Htnw4PwqoTUmt20IkLtg3VcAcg= X-Received: by 2002:a0d:ddd6:0:b0:2d6:8c55:7ba0 with SMTP id g205-20020a0dddd6000000b002d68c557ba0mr29795736ywe.177.1646229946347; Wed, 02 Mar 2022 06:05:46 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Paul B Mahol Date: Wed, 2 Mar 2022 15:07:25 +0100 Message-ID: To: FFmpeg development discussions and patches X-Content-Filtered-By: Mailman/MimeDel 2.1.29 Subject: Re: [FFmpeg-devel] [PATCH 1/2] doc/examples/transcode_aac: Don't ignore last encoded frame 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: On Wed, Mar 2, 2022 at 1:53 PM Andreas Unterweger wrote: > > On 02.03.2022 13:27 Paul B Mahol wrote: > > > > > > On Wed, Mar 2, 2022 at 1:18 PM Andreas Unterweger > > wrote: > > > > > > On 02.03.2022 12:55 Paul B Mahol wrote: > > > > > > do { > > > > > > - data_written = 0; > > > > > > > > > > > > > why this is removed ? > > > > > > > > > > > > > > if (encode_audio_frame(NULL, > output_format_context, > > > > > > output_codec_context, > > > > > &data_written)) > > > > > > goto cleanup; > > > > > > It is removed because the function encode_audio_frame (next line) > > > already sets data_written as an output value (this is also in the > > > documentation of this function). It is thus not needed to initialize > > > data_written a second time outside of the function. > > > > > > > Note that it does not set it immediately at start, but later, and upon > > error it is left untouched/uninitialized. > > > > In case of an error, an error code is returned from the function and > the output value has no meaning. In the calling function, the cleanup > is invoked and data_written is not used (as it would make no sense to > use it in case of an error, anyway). > > This behavior is the same as with the decode_audio_frame function. The > only difference is that the finished = 0 initialization in line 830 is > needed to avoid to forcefully flush the decoder in lines 865ff on an > empty input file. > The patch on patchwork looks fine. > _______________________________________________ > 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". > _______________________________________________ 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".