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 8205648CB0 for ; Wed, 24 Jan 2024 08:19:58 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id D5C4E68D146; Wed, 24 Jan 2024 10:17:44 +0200 (EET) Received: from mail1.khirnov.net (quelana.khirnov.net [94.230.150.81]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 7320E68C99B for ; Wed, 24 Jan 2024 10:17:27 +0200 (EET) Authentication-Results: mail1.khirnov.net; dkim=pass (2048-bit key; unprotected) header.d=khirnov.net header.i=@khirnov.net header.a=rsa-sha256 header.s=mail header.b=mKJY2AV4; dkim-atps=neutral Received: from localhost (mail1.khirnov.net [IPv6:::1]) by mail1.khirnov.net (Postfix) with ESMTP id 27C4B1C03 for ; Wed, 24 Jan 2024 09:17:26 +0100 (CET) Received: from mail1.khirnov.net ([IPv6:::1]) by localhost (mail1.khirnov.net [IPv6:::1]) (amavis, port 10024) with ESMTP id DqVcx-5HSPfo for ; Wed, 24 Jan 2024 09:17:25 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=khirnov.net; s=mail; t=1706084240; bh=l/v59EmLlKlFR86buYdhPWpLvzc0Lfwuh7hK1+Gaz6U=; h=From:To:Subject:Date:In-Reply-To:References:From; b=mKJY2AV4dG5aOgPHsZ0Mquuk9E7aDiN3yUhwbsyh2/f6+h+Ie3Jtm4QVgS0n4Cofh LAaAqcex36fIp/1P9ugmTknnhtbuqTgVAy1ebG5eG5QnKrxr0jjwibTJER/JVDYwaW r9Wo+u6pw1xar06nK5teftostDoQd4CTPuvppuLP5tn5fH7188ORxT5125zC/eTCEA avjXHWPxICjasISm3BI84TFcORqy5T9GVU1ZEyxNQgWVwlMf7sdyf/bjVk+E4qbtGX 7Ok/fr7eZB1w5U8e9ZcNhN3BEaBTMwUCfMRBWww1jyIWMk5MvoLdmiFrHryluQQTzo +a8ecQpnOH2lA== 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 88D9C1C11 for ; Wed, 24 Jan 2024 09:17:20 +0100 (CET) Received: from libav.khirnov.net (libav.khirnov.net [IPv6:::1]) by libav.khirnov.net (Postfix) with ESMTP id 7B6103A061F for ; Wed, 24 Jan 2024 09:17:20 +0100 (CET) From: Anton Khirnov To: ffmpeg-devel@ffmpeg.org Date: Wed, 24 Jan 2024 09:17:00 +0100 Message-ID: <20240124081702.4759-30-anton@khirnov.net> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20240124081702.4759-1-anton@khirnov.net> References: <20240124081702.4759-1-anton@khirnov.net> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 30/31] fftools/ffmpeg: make InputStream.decoder_opts private to demuxer 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 no longer used outside of ffmpeg_demux. --- fftools/ffmpeg.h | 1 - fftools/ffmpeg_demux.c | 16 +++++++++------- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/fftools/ffmpeg.h b/fftools/ffmpeg.h index 29d8ea4355..8395fd260c 100644 --- a/fftools/ffmpeg.h +++ b/fftools/ffmpeg.h @@ -349,7 +349,6 @@ typedef struct InputStream { AVRational framerate_guessed; - AVDictionary *decoder_opts; AVRational framerate; /* framerate forced with -r */ #if FFMPEG_OPT_TOP int top_field_first; diff --git a/fftools/ffmpeg_demux.c b/fftools/ffmpeg_demux.c index 61a4a745b4..60dc9620c2 100644 --- a/fftools/ffmpeg_demux.c +++ b/fftools/ffmpeg_demux.c @@ -77,6 +77,7 @@ typedef struct DemuxStream { const AVCodecDescriptor *codec_desc; + AVDictionary *decoder_opts; DecoderOpts dec_opts; char dec_name[16]; @@ -828,7 +829,7 @@ static void ist_free(InputStream **pist) dec_free(&ist->decoder); - av_dict_free(&ist->decoder_opts); + av_dict_free(&ds->decoder_opts); av_freep(&ist->filters); av_freep(&ist->outputs); av_freep(&ds->dec_opts.hwaccel_device); @@ -916,7 +917,7 @@ static int ist_use(InputStream *ist, int decoding_needed) if (ist->dec->id == AV_CODEC_ID_DVB_SUBTITLE && (ds->decoding_needed & DECODING_FOR_OST)) { - av_dict_set(&ist->decoder_opts, "compute_edt", "1", AV_DICT_DONT_OVERWRITE); + av_dict_set(&ds->decoder_opts, "compute_edt", "1", AV_DICT_DONT_OVERWRITE); if (ds->decoding_needed & DECODING_FOR_FILTER) av_log(ist, AV_LOG_WARNING, "Warning using DVB subtitles for filtering and output at the " @@ -932,7 +933,7 @@ static int ist_use(InputStream *ist, int decoding_needed) ds->dec_opts.log_parent = ist; ret = dec_open(&ist->decoder, d->sch, - &ist->decoder_opts, &ds->dec_opts); + &ds->decoder_opts, &ds->dec_opts); if (ret < 0) return ret; ds->sch_idx_dec = ret; @@ -1267,7 +1268,7 @@ static int ist_add(const OptionsContext *o, Demuxer *d, AVStream *st) return ret; ret = filter_codec_opts(o->g->codec_opts, ist->st->codecpar->codec_id, - ic, st, ist->dec, &ist->decoder_opts); + ic, st, ist->dec, &ds->decoder_opts); if (ret < 0) return ret; @@ -1293,12 +1294,12 @@ static int ist_add(const OptionsContext *o, Demuxer *d, AVStream *st) } if (o->bitexact) - av_dict_set(&ist->decoder_opts, "flags", "+bitexact", AV_DICT_MULTIKEY); + av_dict_set(&ds->decoder_opts, "flags", "+bitexact", AV_DICT_MULTIKEY); /* Attached pics are sparse, therefore we would not want to delay their decoding * till EOF. */ if (ist->st->disposition & AV_DISPOSITION_ATTACHED_PIC) - av_dict_set(&ist->decoder_opts, "thread_type", "-frame", 0); + av_dict_set(&ds->decoder_opts, "thread_type", "-frame", 0); switch (par->codec_type) { case AVMEDIA_TYPE_VIDEO: @@ -1772,8 +1773,9 @@ int ifile_open(const OptionsContext *o, const char *filename, Scheduler *sch) /* check if all codec options have been used */ unused_opts = strip_specifiers(o->g->codec_opts); for (i = 0; i < f->nb_streams; i++) { + DemuxStream *ds = ds_from_ist(f->streams[i]); e = NULL; - while ((e = av_dict_iterate(f->streams[i]->decoder_opts, e))) + while ((e = av_dict_iterate(ds->decoder_opts, e))) av_dict_set(&unused_opts, e->key, NULL, 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".