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 9F1FB49F56 for ; Tue, 16 Apr 2024 17:42:14 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 986C468D23B; Tue, 16 Apr 2024 20:42:11 +0300 (EEST) Received: from mail-lf1-f45.google.com (mail-lf1-f45.google.com [209.85.167.45]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id A9C4068B22A for ; Tue, 16 Apr 2024 20:42:04 +0300 (EEST) Received: by mail-lf1-f45.google.com with SMTP id 2adb3069b0e04-518d98b9620so3350326e87.3 for ; Tue, 16 Apr 2024 10:42:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1713289323; x=1713894123; darn=ffmpeg.org; h=user-agent:in-reply-to:content-disposition:mime-version:references :mail-followup-to:message-id:subject:cc:to:from:date:from:to:cc :subject:date:message-id:reply-to; bh=eEAYSRNF/y7d78C1Pg0LbOZme+HN11hz9aegxiJTudc=; b=ezCNSZL3kMp8SDTUZJpQkW3q4A7M0v+ttOCNlVibPYMvOgZ4UytD3sy0lMkR/NOrEm Te9W5Owvwm7wSJTCQuHIWnlPk7Ey2YOCLe6ZHQ9Yc5bvtwmcIVBmBgIAUaun/E894VQT hNLeaguRlPfzRLmXZi2oq9f0ykQxKIb5+F45G7bCyquew8mNnplIilM031PRhu35EE81 rfg20rAMnX90q+VKrZRxY+l4UbXTtxRQCbh4VsROlqQDQ9aNmHvOsgd3ZcaXUqsQyd6k IyIQPWK4+YWf7oFIAWHZLl91E9p+gh5BzriFFNDEsfkxu/VpoVdHXb6dCGpTAh+3VAVo 6HMw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713289323; x=1713894123; h=user-agent:in-reply-to:content-disposition:mime-version:references :mail-followup-to:message-id:subject:cc:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=eEAYSRNF/y7d78C1Pg0LbOZme+HN11hz9aegxiJTudc=; b=GGHi2iFky1IbfUwzWY9/sZzc0jtc9+1H0gzcCj02MoBMT0jiUr2aziRaeOp7gMG+tT mX2UlR8hPjOwLpKvzxrZQ1VPpN5zTvE88/MRkexZg64dCDOhTWWVxD33MTfopRFVJISN wQ26QkP+Xwyw1NB0aBe9gTgh58sbF43GBwHxEG+Xroj39EVbfht1sPXSyJrF1Fyuytyl YtcUTAFPDGOBxYOe8Cja3jzvLrn/srGqXumNU+X5nmorJAPOePFfdb2qc9Nr3pY5gLXS 1r2mbzAB9AzTGIQnTQr0PB0gLpspdFm62QZUMPxmUO5aJsZhAeT3hSwV0CaDrKll75QF T/kg== X-Gm-Message-State: AOJu0YzqS9Baw1rswiglZzrNuNe5MxamMVboEktjPSaSOgVdVtORrEBZ T1q8pHudJ9OiET86/Swo7PebKctn09JnAxqjRx43XRpnYPfuKbyYWgC9Ug== X-Google-Smtp-Source: AGHT+IGLKMvzgs1itI0pZ51GuxEblLO6pbj04gj7d6JcV2JHRsfgMpdKNQhINVMyhmwE3sON1Hi1IA== X-Received: by 2002:a05:6512:3283:b0:513:1a9c:ae77 with SMTP id p3-20020a056512328300b005131a9cae77mr9388921lfe.52.1713289322791; Tue, 16 Apr 2024 10:42:02 -0700 (PDT) Received: from mariano (host-82-58-28-189.retail.telecomitalia.it. [82.58.28.189]) by smtp.gmail.com with ESMTPSA id cw4-20020a170906c78400b00a4e58c74c9fsm7066999ejb.6.2024.04.16.10.42.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 16 Apr 2024 10:42:02 -0700 (PDT) Received: by mariano (Postfix, from userid 1000) id 1D0A1BFCE8; Tue, 16 Apr 2024 19:42:01 +0200 (CEST) Date: Tue, 16 Apr 2024 19:42:01 +0200 From: Stefano Sabatini To: FFmpeg development discussions and patches Message-ID: Mail-Followup-To: FFmpeg development discussions and patches , Andreas Rheinhardt References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/2.1.4 (2021-12-11) Subject: Re: [FFmpeg-devel] [PATCH] avformat/lc3: Only allow AV_CODEC_ID_LC3 in muxer 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: Andreas Rheinhardt 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 date Tuesday 2024-04-16 19:23:27 +0200, Andreas Rheinhardt wrote: > Also check for the number of streams and the AVCodecID generically > using FF_OFMT_FLAGs. > > Signed-off-by: Andreas Rheinhardt > --- > libavformat/lc3.c | 14 +++----------- > 1 file changed, 3 insertions(+), 11 deletions(-) > > diff --git a/libavformat/lc3.c b/libavformat/lc3.c > index 93ce720af3..16c12a98d7 100644 > --- a/libavformat/lc3.c > +++ b/libavformat/lc3.c > @@ -186,16 +186,6 @@ const FFInputFormat ff_lc3_demuxer = { > > #if CONFIG_LC3_MUXER > > -static av_cold int lc3_muxer_init(AVFormatContext *s) > -{ > - if (s->nb_streams != 1) { > - av_log(s, AV_LOG_ERROR, "This muxer only supports a single stream.\n"); > - return AVERROR(EINVAL); > - } > - > - return 0; > -} > - > static int lc3_write_header(AVFormatContext *s) > { > AVStream *st = s->streams[0]; > @@ -243,8 +233,10 @@ const FFOutputFormat ff_lc3_muxer = { > .p.extensions = "lc3", > .p.audio_codec = AV_CODEC_ID_LC3, > .p.video_codec = AV_CODEC_ID_NONE, > + .p.subtitle_codec = AV_CODEC_ID_NONE, > .p.flags = AVFMT_NOTIMESTAMPS, > - .init = lc3_muxer_init, > + .flags_internal = FF_OFMT_FLAG_MAX_ONE_OF_EACH | > + FF_OFMT_FLAG_ONLY_DEFAULT_CODECS, > .write_header = lc3_write_header, > .write_packet = lc3_write_packet, > }; LGTM, thanks. _______________________________________________ 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".