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 B2C1B43FFB for ; Wed, 24 Aug 2022 08:46:13 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id D01DD68BA69; Wed, 24 Aug 2022 11:44:05 +0300 (EEST) Received: from mail0.khirnov.net (red.khirnov.net [176.97.15.12]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id DE65768BA0D for ; Wed, 24 Aug 2022 11:43:48 +0300 (EEST) Received: from localhost (localhost [IPv6:::1]) by mail0.khirnov.net (Postfix) with ESMTP id 2A120240D1E for ; Wed, 24 Aug 2022 10:43:45 +0200 (CEST) Received: from mail0.khirnov.net ([IPv6:::1]) by localhost (mail0.khirnov.net [IPv6:::1]) (amavisd-new, port 10024) with ESMTP id nz6HzAL2Aup4 for ; Wed, 24 Aug 2022 10:43:44 +0200 (CEST) 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 mail0.khirnov.net (Postfix) with ESMTPS id B9BE6240D20 for ; Wed, 24 Aug 2022 10:43:41 +0200 (CEST) Received: by libav.khirnov.net (Postfix, from userid 1000) id B55703A262C; Wed, 24 Aug 2022 10:43:35 +0200 (CEST) From: Anton Khirnov To: ffmpeg-devel@ffmpeg.org Date: Wed, 24 Aug 2022 10:43:16 +0200 Message-Id: <20220824084318.333-16-anton@khirnov.net> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220824084318.333-1-anton@khirnov.net> References: <20220824084318.333-1-anton@khirnov.net> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 16/18] lavf/dv: set audio bitrate only at stream creation 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: Demuxers are not supposed to update AVCodecParameters after the stream was seen by the caller. This value is not important enough to support dynamic updates for. --- libavformat/dv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavformat/dv.c b/libavformat/dv.c index f65c2d596f..9c8b0a262c 100644 --- a/libavformat/dv.c +++ b/libavformat/dv.c @@ -280,6 +280,7 @@ static int dv_extract_audio_info(DVDemuxContext *c, const uint8_t *frame) c->ast[i]->codecpar->codec_id = AV_CODEC_ID_PCM_S16LE; c->ast[i]->codecpar->ch_layout = (AVChannelLayout)AV_CHANNEL_LAYOUT_STEREO; c->ast[i]->start_time = 0; + c->ast[i]->codecpar->bit_rate = 2 * dv_audio_frequency[freq] * 16; c->audio_pkt[i].size = 0; c->audio_pkt[i].data = c->audio_buf[i]; @@ -290,7 +291,6 @@ static int dv_extract_audio_info(DVDemuxContext *c, const uint8_t *frame) c->audio_pkt[i].pos = -1; } c->ast[i]->codecpar->sample_rate = dv_audio_frequency[freq]; - c->ast[i]->codecpar->bit_rate = 2 * dv_audio_frequency[freq] * 16; } c->ach = ach; -- 2.35.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".