summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rwxr-xr-xtools/gst-launch-ext13
1 files changed, 11 insertions, 2 deletions
diff --git a/tools/gst-launch-ext b/tools/gst-launch-ext
index d61d34d3..193c2555 100755
--- a/tools/gst-launch-ext
+++ b/tools/gst-launch-ext
@@ -13,8 +13,17 @@ my (%pipes, %cfg);
sub extension
{
my $path = shift;
- my $ext = (fileparse ($path, '\..*?'))[2];
- $ext =~ s/^\.//;
+ my $ext;
+
+ # get only the bit after the last period. We don't deal with
+ # .tar.gz extensions do we ?
+ if ($path =~ /\./)
+ {
+ my $ext = $path;
+ $ext =~ s/^.*\.//;
+ }
+ else { $ext = ""; }
+
return $ext;
}