aboutsummaryrefslogtreecommitdiffstats
path: root/src/ffmpeg.zig
diff options
context:
space:
mode:
Diffstat (limited to 'src/ffmpeg.zig')
-rw-r--r--src/ffmpeg.zig8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/ffmpeg.zig b/src/ffmpeg.zig
index 67c3c2c..dda3f8c 100644
--- a/src/ffmpeg.zig
+++ b/src/ffmpeg.zig
@@ -286,7 +286,6 @@ pub const VideoSource = struct {
self.* = .{
.source = .{
.texture = undefined,
-
.deinit_fn = deinit,
},
.decoder = if (is_hap and build_config.have_hap)
@@ -356,7 +355,6 @@ pub const StreamSource = struct {
self.* = .{
.source = .{
.texture = texture,
-
.deinit_fn = deinit,
},
@@ -389,7 +387,11 @@ pub const StreamSource = struct {
if (self.packet.*.stream_index != self.stream) return;
self.decoder.num_frames = 0;
- _ = try self.decoder.process_packet_fn(self.decoder, self.packet, &self.source.texture);
+ _ = try self.decoder.process_packet_fn(
+ self.decoder,
+ self.packet,
+ if (self.source.shouldStep()) &self.source.texture else null,
+ );
}
fn deinit(source: *gl.Source, allocator: std.mem.Allocator) void {