fftools: move check_avoptions and remove_avoptions to cmdutils

Signed-off-by: Marton Balint <cus@passwd.hu>
This commit is contained in:
Marton Balint
2024-05-18 15:55:18 +02:00
parent 169b6ee732
commit f9810be5d3
4 changed files with 26 additions and 23 deletions

View File

@@ -473,26 +473,6 @@ const FrameData *packet_data_c(AVPacket *pkt)
return ret < 0 ? NULL : (const FrameData*)pkt->opaque_ref->data;
}
void remove_avoptions(AVDictionary **a, AVDictionary *b)
{
const AVDictionaryEntry *t = NULL;
while ((t = av_dict_iterate(b, t))) {
av_dict_set(a, t->key, NULL, AV_DICT_MATCH_CASE);
}
}
int check_avoptions(AVDictionary *m)
{
const AVDictionaryEntry *t = av_dict_iterate(m, NULL);
if (t) {
av_log(NULL, AV_LOG_FATAL, "Option %s not found.\n", t->key);
return AVERROR_OPTION_NOT_FOUND;
}
return 0;
}
void update_benchmark(const char *fmt, ...)
{
if (do_benchmark_all) {