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

Method setDTS

YUViewLib/src/ffmpeg/AVPacketWrapper.cpp:225–248  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

223}
224
225void AVPacketWrapper::setDTS(int64_t dts)
226{
227 if (this->libVer.avcodec.major == 56)
228 {
229 auto p = reinterpret_cast<AVPacket_56 *>(this->pkt);
230 p->dts = dts;
231 this->dts = dts;
232 }
233 else if (this->libVer.avcodec.major == 57 || this->libVer.avcodec.major == 58)
234 {
235 auto p = reinterpret_cast<AVPacket_57_58 *>(this->pkt);
236 p->dts = dts;
237 this->dts = dts;
238 }
239 else if (this->libVer.avcodec.major == 59 || //
240 this->libVer.avcodec.major == 60)
241 {
242 auto p = reinterpret_cast<AVPacket_59_60 *>(this->pkt);
243 p->dts = dts;
244 this->dts = dts;
245 }
246 else
247 throw std::runtime_error("Invalid library version");
248}
249
250AVPacket *AVPacketWrapper::getPacket()
251{

Callers 1

pushDataMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected