aboutsummaryrefslogtreecommitdiffstats
path: root/src/ffmpeg.zig
diff options
context:
space:
mode:
Diffstat (limited to 'src/ffmpeg.zig')
-rw-r--r--src/ffmpeg.zig5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/ffmpeg.zig b/src/ffmpeg.zig
index 9d3bc9a..f848ef8 100644
--- a/src/ffmpeg.zig
+++ b/src/ffmpeg.zig
@@ -53,6 +53,9 @@ pub const Decoder = struct {
const more = try self.process_packet_fn(self, packet, texture);
progress.setCompletedItems(@intCast(self.num_frames));
if (!more) break;
+ if (texture) |tex| {
+ if (tex.type == .TEXTURE_2D) break;
+ }
}
c.av_packet_unref(packet);
} else {
@@ -204,7 +207,7 @@ pub const AVDecoder = struct {
self.rgba_frame.*.data[0],
);
- if (tex.type == .TEXTURE_2D) return false;
+ if (tex.type == .TEXTURE_2D) return true;
}
self.decoder.num_frames += 1;