Skip to content

Commit ea8ffb5

Browse files
committed
Add fallback for AVFrame.pkt_dts, which is only used on certain codecs (AV1)
1 parent cd514a1 commit ea8ffb5

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/FFmpegReader.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1180,6 +1180,9 @@ bool FFmpegReader::GetAVFrame() {
11801180
// This is the current decoded frame (and should be the pts used) for
11811181
// processing this data
11821182
video_pts = next_frame->pts;
1183+
} else if (next_frame->pkt_dts != AV_NOPTS_VALUE) {
1184+
// Some videos only set this timestamp (fallback)
1185+
video_pts = next_frame->pkt_dts;
11831186
}
11841187

11851188
// break out of loop after each successful image returned

0 commit comments

Comments
 (0)