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 8D84249FDD for ; Sat, 18 May 2024 16:12:03 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 733F668CF84; Sat, 18 May 2024 19:11:39 +0300 (EEST) Received: from iq.passwd.hu (iq.passwd.hu [217.27.212.140]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id A86F168CED8 for ; Sat, 18 May 2024 19:11:31 +0300 (EEST) Received: from localhost (localhost [127.0.0.1]) by iq.passwd.hu (Postfix) with ESMTP id 6E0C0EA681; Sat, 18 May 2024 18:11:31 +0200 (CEST) X-Virus-Scanned: amavisd-new at passwd.hu Received: from iq.passwd.hu ([127.0.0.1]) by localhost (iq.passwd.hu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id G1Kc2DycIqxZ; Sat, 18 May 2024 18:11:29 +0200 (CEST) Received: from bluegene.passwd.hu (localhost [127.0.0.1]) by iq.passwd.hu (Postfix) with ESMTP id 61BD3EA67D; Sat, 18 May 2024 18:11:28 +0200 (CEST) From: Marton Balint To: ffmpeg-devel@ffmpeg.org Date: Sat, 18 May 2024 18:11:15 +0200 Message-Id: <20240518161116.8661-4-cus@passwd.hu> X-Mailer: git-send-email 2.35.3 In-Reply-To: <20240518161116.8661-1-cus@passwd.hu> References: <20240518161116.8661-1-cus@passwd.hu> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 4/5] fftools/ffplay: use cmdutils code for checking remaining avoptions 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: Marton Balint 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: Signed-off-by: Marton Balint --- fftools/ffplay.c | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/fftools/ffplay.c b/fftools/ffplay.c index b9d11eecee..ff48fa5f8c 100644 --- a/fftools/ffplay.c +++ b/fftools/ffplay.c @@ -2626,7 +2626,6 @@ static int stream_component_open(VideoState *is, int stream_index) const AVCodec *codec; const char *forced_codec_name = NULL; AVDictionary *opts = NULL; - const AVDictionaryEntry *t = NULL; int sample_rate; AVChannelLayout ch_layout = { 0 }; int ret = 0; @@ -2694,11 +2693,9 @@ static int stream_component_open(VideoState *is, int stream_index) if ((ret = avcodec_open2(avctx, codec, &opts)) < 0) { goto fail; } - if ((t = av_dict_get(opts, "", NULL, AV_DICT_IGNORE_SUFFIX))) { - av_log(NULL, AV_LOG_ERROR, "Option %s not found.\n", t->key); - ret = AVERROR_OPTION_NOT_FOUND; + ret = check_avoptions(opts); + if (ret < 0) goto fail; - } is->eof = 0; ic->streams[stream_index]->discard = AVDISCARD_DEFAULT; @@ -2862,11 +2859,9 @@ static int read_thread(void *arg) if (scan_all_pmts_set) av_dict_set(&format_opts, "scan_all_pmts", NULL, AV_DICT_MATCH_CASE); - if ((t = av_dict_get(format_opts, "", NULL, AV_DICT_IGNORE_SUFFIX))) { - av_log(NULL, AV_LOG_ERROR, "Option %s not found.\n", t->key); - ret = AVERROR_OPTION_NOT_FOUND; + ret = check_avoptions(format_opts); + if (ret < 0) goto fail; - } is->ic = ic; if (genpts) -- 2.35.3 _______________________________________________ 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".