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 3416245AF5 for ; Wed, 13 Dec 2023 19:31:28 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 1AA0668D182; Wed, 13 Dec 2023 21:30:36 +0200 (EET) Received: from mail1.khirnov.net (quelana.khirnov.net [94.230.150.81]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 87EFB68D06A for ; Wed, 13 Dec 2023 21:30:23 +0200 (EET) Received: from localhost (mail1.khirnov.net [IPv6:::1]) by mail1.khirnov.net (Postfix) with ESMTP id 31F431B9A for ; Wed, 13 Dec 2023 20:30:23 +0100 (CET) Received: from mail1.khirnov.net ([IPv6:::1]) by localhost (mail1.khirnov.net [IPv6:::1]) (amavis, port 10024) with ESMTP id tUJyrUVGckQw for ; Wed, 13 Dec 2023 20:30:22 +0100 (CET) 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 513D21783 for ; Wed, 13 Dec 2023 20:30:21 +0100 (CET) Received: from libav.khirnov.net (libav.khirnov.net [IPv6:::1]) by libav.khirnov.net (Postfix) with ESMTP id 3F2643A067E for ; Wed, 13 Dec 2023 20:30:14 +0100 (CET) From: Anton Khirnov To: ffmpeg-devel@ffmpeg.org Date: Wed, 13 Dec 2023 20:30:00 +0100 Message-ID: <20231213193007.17471-5-anton@khirnov.net> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20231213193007.17471-1-anton@khirnov.net> References: <20231213193007.17471-1-anton@khirnov.net> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 05/12] fftools/ffmpeg: move InputStream.codec_desc to private data 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: It is not used outside of ffmpeg_demux. --- fftools/ffmpeg.h | 1 - fftools/ffmpeg_demux.c | 8 +++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/fftools/ffmpeg.h b/fftools/ffmpeg.h index 0bab44cefc..f214e4efcb 100644 --- a/fftools/ffmpeg.h +++ b/fftools/ffmpeg.h @@ -353,7 +353,6 @@ typedef struct InputStream { Decoder *decoder; AVCodecContext *dec_ctx; const AVCodec *dec; - const AVCodecDescriptor *codec_desc; AVRational framerate_guessed; diff --git a/fftools/ffmpeg_demux.c b/fftools/ffmpeg_demux.c index 9779580819..865c1e7d2f 100644 --- a/fftools/ffmpeg_demux.c +++ b/fftools/ffmpeg_demux.c @@ -83,6 +83,8 @@ typedef struct DemuxStream { ///< dts of the last packet read for this stream (in AV_TIME_BASE units) int64_t dts; + const AVCodecDescriptor *codec_desc; + /* number of packets successfully read for this stream */ uint64_t nb_packets; // combined size of all the packets read @@ -320,8 +322,8 @@ static int ist_dts_update(DemuxStream *ds, AVPacket *pkt) (AVRational){ 2, 1 }); int fields = 2; - if (ist->codec_desc && - (ist->codec_desc->props & AV_CODEC_PROP_FIELDS) && + if (ds->codec_desc && + (ds->codec_desc->props & AV_CODEC_PROP_FIELDS) && av_stream_get_parser(ist->st)) fields = 1 + av_stream_get_parser(ist->st)->repeat_pict; @@ -1252,7 +1254,7 @@ static int ist_add(const OptionsContext *o, Demuxer *d, AVStream *st) return ret; } - ist->codec_desc = avcodec_descriptor_get(ist->par->codec_id); + ds->codec_desc = avcodec_descriptor_get(ist->par->codec_id); return 0; } -- 2.42.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".