Skip to content

Commit

Permalink
refactor(reporters): simplify the match? method of the progress and s…
Browse files Browse the repository at this point in the history
…ilence reporters

Refs: ARC-9901
  • Loading branch information
bajankristof committed Nov 29, 2024
1 parent 85259af commit d5bcb12
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/ffmpeg/reporters/progress.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion lib/ffmpeg/reporters/silence.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit d5bcb12

Please sign in to comment.