diff options
author | Marton Balint <cus@passwd.hu> | 2024-05-18 16:03:36 +0200 |
---|---|---|
committer | Marton Balint <cus@passwd.hu> | 2024-05-27 21:46:47 +0200 |
commit | 4d975571372d64f5feaa7737604190d34b37457f (patch) | |
tree | caf2e53d4444ad72f4ab6141e6daa308e0a155a6 /fftools/ffplay.c | |
parent | f9810be5d32fec736c65fcad07a7413546aeacef (diff) | |
download | ffmpeg-4d975571372d64f5feaa7737604190d34b37457f.tar.gz |
fftools/ffplay: use cmdutils code for checking remaining avoptions
Signed-off-by: Marton Balint <cus@passwd.hu>
Diffstat (limited to 'fftools/ffplay.c')
-rw-r--r-- | fftools/ffplay.c | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/fftools/ffplay.c b/fftools/ffplay.c index 5a66bfa38d..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_iterate(opts, NULL))) { - 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_iterate(format_opts, NULL))) { - 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) |