MCPcopy Create free account
hub / github.com/IENT/YUView / update

Method update

YUViewLib/src/ffmpeg/AVFrameSideDataWrapper.cpp:84–112  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

82}
83
84void AVFrameSideDataWrapper::update()
85{
86 if (this->sideData == nullptr)
87 return;
88
89 if (this->libVer.avutil.major == 54 || //
90 this->libVer.avutil.major == 55 || //
91 this->libVer.avutil.major == 56)
92 {
93 auto p = reinterpret_cast<AVFrameSideData_54_55_56 *>(sideData);
94 this->type = p->type;
95 this->data = p->data;
96 if (p->size > 0)
97 this->size = size_t(p->size);
98 this->metadata = p->metadata;
99 this->buf = p->buf;
100 }
101 else if (this->libVer.avutil.major == 57 || this->libVer.avutil.major == 58)
102 {
103 auto p = reinterpret_cast<AVFrameSideData_57_58 *>(sideData);
104 this->type = p->type;
105 this->data = p->data;
106 this->size = p->size;
107 this->metadata = p->metadata;
108 this->buf = p->buf;
109 }
110 else
111 throw std::runtime_error("Invalid library version");
112}
113
114} // namespace FFmpeg

Callers 3

getMotionVectorMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected