diff options
author | Eric Wong <normalperson@yhbt.net> | 2013-08-26 00:35:03 +0000 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2013-08-26 00:40:52 +0000 |
commit | 6d67d9c2af57233743187a92b7e651174d6eb42b (patch) | |
tree | 2c174e81b241de8d30786180e98e6d5f9979bd60 /lib/dtas/source/av.rb | |
parent | a1198562c51c5374a85d74e1cfe9e6a695384a3d (diff) | |
download | dtas-6d67d9c2af57233743187a92b7e651174d6eb42b.tar.gz |
I forgot :err is already handled by Process.spawn, so split out the functionality into err_str where we want to use it. Also, add a :no_raise flag which will allow us to better handle avprobe/soxi calls which can fail and avoid needless exceptions.
Diffstat (limited to 'lib/dtas/source/av.rb')
-rw-r--r-- | lib/dtas/source/av.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/dtas/source/av.rb b/lib/dtas/source/av.rb index 1de0a72..66ee320 100644 --- a/lib/dtas/source/av.rb +++ b/lib/dtas/source/av.rb @@ -25,7 +25,7 @@ class DTAS::Source::Av # :nodoc: def self.try(infile, offset = nil) err = "" - DTAS::Process.qx(%W(avprobe #{infile}), err: err) + DTAS::Process.qx(%W(avprobe #{infile}), err_str: err) return if err =~ /Unable to find a suitable output format for/ new(infile, offset) rescue @@ -44,7 +44,7 @@ class DTAS::Source::Av # :nodoc: @format.bits = @precision @comments = {} err = "" - s = qx(%W(avprobe -show_streams -show_format #@infile), err: err) + s = qx(%W(avprobe -show_streams -show_format #@infile), err_str: err) @astreams = [] s.scan(%r{^\[STREAM\]\n(.*?)\n\[/STREAM\]\n}m) do |_| stream = $1 |