commit:     3315ea5b65539aac1a38a0342eb3c5717aa3cd8f
Author:     Hans de Graaff <hans <AT> degraaff <DOT> org>
AuthorDate: Wed Sep 10 08:53:35 2014 +0000
Commit:     Hans de Graaff <graaff <AT> gentoo <DOT> org>
CommitDate: Wed Sep 10 08:53:35 2014 +0000
URL:        
http://sources.gentoo.org/gitweb/?p=dev/graaff.git;a=commit;h=3315ea5b

Add patch to handle ffmpeg encoding issues.

Package-Manager: portage-2.2.8-r1

---
 dev-ruby/rvideo/ChangeLog                          |  4 ++
 dev-ruby/rvideo/files/rvideo-output-encoding.patch | 49 ++++++++++++++++++++++
 dev-ruby/rvideo/rvideo-0.9.5.ebuild                |  2 +-
 3 files changed, 54 insertions(+), 1 deletion(-)

diff --git a/dev-ruby/rvideo/ChangeLog b/dev-ruby/rvideo/ChangeLog
index 917f7a0..e2f2092 100644
--- a/dev-ruby/rvideo/ChangeLog
+++ b/dev-ruby/rvideo/ChangeLog
@@ -2,6 +2,10 @@
 # Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2
 # $Header: $
 
+  10 Sep 2014; Hans de Graaff <gra...@gentoo.org> rvideo-0.9.5.ebuild,
+  +files/rvideo-output-encoding.patch:
+  Add patch to handle ffmpeg encoding issues.
+
   10 Sep 2014; Hans de Graaff <gra...@gentoo.org> rvideo-0.9.5.ebuild:
   Bash syntax, not ruby.
 

diff --git a/dev-ruby/rvideo/files/rvideo-output-encoding.patch 
b/dev-ruby/rvideo/files/rvideo-output-encoding.patch
new file mode 100644
index 0000000..012f10e
--- /dev/null
+++ b/dev-ruby/rvideo/files/rvideo-output-encoding.patch
@@ -0,0 +1,49 @@
+diff --git a/lib/rvideo/inspector.rb b/lib/rvideo/inspector.rb
+index f93466f..0d2f43a 100644
+--- a/lib/rvideo/inspector.rb
++++ b/lib/rvideo/inspector.rb
+@@ -45,7 +45,8 @@ module RVideo # :nodoc:
+         @path = File.dirname(file)
+         @full_filename = file
+         raise TranscoderError::InputFileNotFound, "File not found (#{file})" 
unless FileTest.exist?(file.gsub("\"",""))
+-        @raw_response = `#{@ffmpeg_binary} -i #{@full_filename} 2>&1`
++        @raw_response = IO::popen("#{@ffmpeg_binary} -i #{@full_filename} 
2>&1",
++                                  :external_encoding => 'ASCII-8BIT').read
+       else
+         raise ArgumentError, "Must supply either an input file or a 
pregenerated response" if options[:raw_response].nil? and file.nil?
+       end
+@@ -542,4 +543,4 @@ module RVideo # :nodoc:
+       match
+     end
+   end
+-end
+\ No newline at end of file
++end
+diff --git a/lib/rvideo/tools/abstract_tool.rb 
b/lib/rvideo/tools/abstract_tool.rb
+index d336baa..565137a 100644
+--- a/lib/rvideo/tools/abstract_tool.rb
++++ b/lib/rvideo/tools/abstract_tool.rb
+@@ -329,7 +329,8 @@ module RVideo # :nodoc:
+         # Pulls the interesting bits of the temp log file into memory.  This 
is fairly tool-specific, so
+         # it's doubtful that this default version is going to work without 
being overridded.
+         def populate_raw_result(temp_file_name)
+-          @raw_result = `tail -n 500 #{temp_file_name}`
++          @raw_result = IO::popen("tail -n 500 #{temp_file_name}",
++                                  :external_encoding => 'ASCII-8BIT').read
+         end
+         
+       end
+diff --git a/lib/rvideo/tools/ffmpeg.rb b/lib/rvideo/tools/ffmpeg.rb
+index 5d4221d..e518171 100644
+--- a/lib/rvideo/tools/ffmpeg.rb
++++ b/lib/rvideo/tools/ffmpeg.rb
+@@ -79,7 +79,8 @@ module RVideo
+         end
+ 
+         # Append the bottom of the log file, where the interesting bits live.
+-        @raw_result << `tail -n 500 #{temp_file_name}`
++        @raw_result << IO::popen("tail -n 500 #{temp_file_name}",
++                                 :external_encoding => 'ASCII-8BIT').read
+       end
+       
+       def parse_result(result)

diff --git a/dev-ruby/rvideo/rvideo-0.9.5.ebuild 
b/dev-ruby/rvideo/rvideo-0.9.5.ebuild
index 9aa9184..88bb289 100644
--- a/dev-ruby/rvideo/rvideo-0.9.5.ebuild
+++ b/dev-ruby/rvideo/rvideo-0.9.5.ebuild
@@ -26,6 +26,6 @@ KEYWORDS="~amd64 ~x86 ~x86-macos"
 SLOT="0"
 IUSE="doc flv"
 
-RUBY_PATCHES=( rvideo-ffmpeg.patch )
+RUBY_PATCHES=( rvideo-ffmpeg.patch rvideo-output-encoding.patch )
 
 ruby_add_rdepend "flv? ( media-video/flvtool2 )"

Reply via email to