Add fallback for AVFrame.pkt_dts, which is only used on certain codecs (AV1)

This commit is contained in:
Jonathan Thomas
2022-10-31 18:57:51 -05:00
parent cd514a1e7f
commit ea8ffb5bc1

View File

@@ -1180,6 +1180,9 @@ bool FFmpegReader::GetAVFrame() {
// This is the current decoded frame (and should be the pts used) for
// processing this data
video_pts = next_frame->pts;
} else if (next_frame->pkt_dts != AV_NOPTS_VALUE) {
// Some videos only set this timestamp (fallback)
video_pts = next_frame->pkt_dts;
}
// break out of loop after each successful image returned