diff --git a/lib/ffmpeg/reporters/progress.rb b/lib/ffmpeg/reporters/progress.rb index 7960efa..85de38b 100644 --- a/lib/ffmpeg/reporters/progress.rb +++ b/lib/ffmpeg/reporters/progress.rb @@ -7,7 +7,7 @@ module Reporters # Represents the progress of an encoding operation. class Progress < Output def self.match?(line) - line =~ /^\s*frame=/ ? true : false + line.match?(/^\s*frame=/) end # Returns the current frame number. diff --git a/lib/ffmpeg/reporters/silence.rb b/lib/ffmpeg/reporters/silence.rb index 97ad2e2..fb8820e 100644 --- a/lib/ffmpeg/reporters/silence.rb +++ b/lib/ffmpeg/reporters/silence.rb @@ -7,7 +7,7 @@ module Reporters # Represents a silence report from ffmpeg. class Silence < Output def self.match?(line) - line =~ /^\[silencedetect @ \w+\]/ ? true : false + line.match?(/^\[silencedetect @ \w+\]/) end # Returns the ID of the filter.