Skip to content

Commit

Permalink
fix(ffmpeg/swscale): don't reuse the output frame
Browse files Browse the repository at this point in the history
  • Loading branch information
stakach committed Jul 30, 2024
1 parent bf2fabb commit a026cd6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion shard.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: ffmpeg
version: 1.3.0
version: 1.3.1

dependencies:
# we use stumpy to extract each pixels colour and draw bounding boxes
Expand Down
4 changes: 2 additions & 2 deletions src/ffmpeg/swscale.cr
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@ class FFmpeg::SWScale
getter output_format : PixelFormat
getter scaling_method : ScalingAlgorithm

# lazy init an output frame if one isn't provided
getter output_frame : Frame do
# create a compatible output frame for storing the scaled result
def output_frame : Frame
FFmpeg::Frame.new(@output_width, @output_height, @output_format)
end

Expand Down

0 comments on commit a026cd6

Please sign in to comment.