diff --git a/YUViewLib/src/ffmpeg/AVPixFmtDescriptorWrapper.cpp b/YUViewLib/src/ffmpeg/AVPixFmtDescriptorWrapper.cpp index f72819cc5..91c1c6768 100644 --- a/YUViewLib/src/ffmpeg/AVPixFmtDescriptorWrapper.cpp +++ b/YUViewLib/src/ffmpeg/AVPixFmtDescriptorWrapper.cpp @@ -109,7 +109,7 @@ typedef struct AVComponentDescriptor_57 int depth; } AVComponentDescriptor_57; -typedef struct AVPixFmtDescriptor_57 +typedef struct AVPixFmtDescriptor_57_58 { const char * name; uint8_t nb_components; @@ -118,7 +118,7 @@ typedef struct AVPixFmtDescriptor_57 uint64_t flags; AVComponentDescriptor_57 comp[4]; const char * alias; -} AVPixFmtDescriptor_57; +} AVPixFmtDescriptor_57_58; AVPixFmtDescriptorWrapper::Flags parseFlags(uint8_t flagsValue) { @@ -217,9 +217,10 @@ AVPixFmtDescriptorWrapper::AVPixFmtDescriptorWrapper(AVPixFmtDescriptor *descrip aliases = QString(p->alias); } - else if (libVer.avutil.major == 57) + else if (libVer.avutil.major == 57 || // + libVer.avutil.major == 58) { - auto p = reinterpret_cast(descriptor); + auto p = reinterpret_cast(descriptor); this->name = QString(p->name); this->nb_components = p->nb_components; this->log2_chroma_w = p->log2_chroma_w;