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

Method setPTS

YUViewLib/src/ffmpeg/AVPacketWrapper.cpp:200–223  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

198}
199
200void AVPacketWrapper::setPTS(int64_t pts)
201{
202 if (this->libVer.avcodec.major == 56)
203 {
204 auto p = reinterpret_cast<AVPacket_56 *>(this->pkt);
205 p->pts = pts;
206 this->pts = pts;
207 }
208 else if (this->libVer.avcodec.major == 57 || this->libVer.avcodec.major == 58)
209 {
210 auto p = reinterpret_cast<AVPacket_57_58 *>(this->pkt);
211 p->pts = pts;
212 this->pts = pts;
213 }
214 else if (this->libVer.avcodec.major == 59 || //
215 this->libVer.avcodec.major == 60)
216 {
217 auto p = reinterpret_cast<AVPacket_59_60 *>(this->pkt);
218 p->pts = pts;
219 this->pts = pts;
220 }
221 else
222 throw std::runtime_error("Invalid library version");
223}
224
225void AVPacketWrapper::setDTS(int64_t dts)
226{

Callers 1

pushDataMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected