Skip to content

Commit

Permalink
fix(video): ensure channels closed if stream ends
Browse files Browse the repository at this point in the history
  • Loading branch information
stakach committed Jul 2, 2023
1 parent 8cc84dd commit b03286b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
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: 0.5.0
version: 0.5.1

dependencies:
# we use stumpy to extract each pixels colour and draw bounding boxes
Expand Down
2 changes: 2 additions & 0 deletions src/ffmpeg/video.cr
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,8 @@ abstract class FFmpeg::Video
end
rescue Channel::ClosedError
ensure
ready.close
data.close
close
@format = Format.new
GC.collect
Expand Down

0 comments on commit b03286b

Please sign in to comment.