google-code-export / ffmpegthumbnailer

Automatically exported from code.google.com/p/ffmpegthumbnailer
GNU General Public License v2.0
1 stars 1 forks source link

GIO native file warning too verbose #105

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
g_file_new_for_uri apparently expects a URI with a schema. If a file name 
without a schema is passed in, then g_file_is_native returns false and 
tryUriConvert spits out a warning message. 

ffmpegthumbnailer -s 128 -i 'file:///tmp/movie.mp4' -o '/tmp/thumbnail.png' -c 
png -f -t 5
ffmpegthumbnailer -s 128 -i '/tmp/movie.mp4' -o '/tmp/thumbnail.png' -c png -f 
-t 5

The second command will result in a warning message, the first will not.

I've attached a patch to make tryUriConvert early return if the file name 
doesn't have a schema.

An alternate fix would be to check for a schema and then use g_file_new_for_uri 
or g_file_new_for_path as appropriate.

Original issue reported on code.google.com by SparkyBl...@gmail.com on 28 May 2013 at 2:17

Attachments:

GoogleCodeExporter commented 9 years ago
Fixed

Original comment by dirk.vdb on 1 Mar 2014 at 8:58