blob: 79761890d35008352b52153b5de66352751be3a2 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
|
diff -rup vision-0.23.0.orig/torchvision/csrc/io/decoder/video_stream.cpp vision-0.23.0/torchvision/csrc/io/decoder/video_stream.cpp
--- vision-0.23.0.orig/torchvision/csrc/io/decoder/video_stream.cpp 2025-09-29 09:28:57.678370404 -0400
+++ vision-0.23.0/torchvision/csrc/io/decoder/video_stream.cpp 2025-09-29 09:29:51.544541164 -0400
@@ -122,7 +122,7 @@ int VideoStream::copyFrameBytes(ByteStor
void VideoStream::setHeader(DecoderHeader* header, bool flush) {
Stream::setHeader(header, flush);
if (!flush) { // no frames for video flush
- header->keyFrame = frame_->key_frame;
+ header->keyFrame = !!(frame_->flags & AV_FRAME_FLAG_KEY);
header->fps = av_q2d(av_guess_frame_rate(
inputCtx_, inputCtx_->streams[format_.stream], nullptr));
}
|