dumping/ffmpeg_backend: add support for ffmpeg 5.0

This commit is contained in:
liushuyu 2022-02-20 04:07:10 -07:00
parent 54a36bc54f
commit 04f201ab34
No known key found for this signature in database
GPG Key ID: 23D1CE4534419437
1 changed files with 5 additions and 0 deletions

View File

@ -758,7 +758,12 @@ void GetOptionList(std::vector<OptionInfo>& out, const AVClass* av_class, bool s
}
const AVClass* child_class = nullptr;
#if LIBAVCODEC_VERSION_MAJOR >= 59
void* iter = nullptr;
while ((child_class = av_opt_child_class_iterate(av_class, &iter))) {
#else
while ((child_class = av_opt_child_class_next(av_class, child_class))) {
#endif
GetOptionListSingle(out, child_class);
}
}