Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
audiowmark
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Stefan Westerfeld
audiowmark
Commits
1bbc129c
Commit
1bbc129c
authored
Apr 04, 2020
by
Stefan Westerfeld
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
videowmark: ensure input and output extension match for watermark add
Signed-off-by:
Stefan Westerfeld
<
stefan@space.twc.de
>
parent
dd2c2fc9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
0 deletions
+10
-0
videowmark
src/videowmark
+10
-0
No files found.
src/videowmark
View file @
1bbc129c
...
...
@@ -43,6 +43,11 @@ function create_temp_files
done
}
function
extension
{
echo
$1
|
awk
-F
.
'{ if (NF > 1) print $NF; }'
}
function
show_help_and_exit
{
cat
<<
EOH
...
...
@@ -87,6 +92,11 @@ while true; do
done
if
[
"
$1
"
==
"add"
]
&&
[
"$#"
==
4
]
;
then
# check file extensions
ext_in
=
$(
extension
"
$2
"
)
ext_out
=
$(
extension
"
$3
"
)
[
"
$ext_in
"
==
"
$ext_out
"
]
||
die
"input/output extension must match ('
$ext_in
' vs. '
$ext_out
')"
# create tmpfiles
create_temp_files 3 4
orig_wav
=
/dev/fd/3
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment