programs/sndfile-metadata-set.c : Error out if trying to update coding history in RDWR mode.

This commit is contained in:
Erik de Castro Lopo 2009-01-11 17:53:03 +11:00
parent e55a3c9b5e
commit 6f4a0343d5
2 changed files with 12 additions and 0 deletions

View File

@ -3,6 +3,7 @@
* programs/sndfile-metadata-get.c
Make valgrind clean.
Clean up temp string array usage.
Error out if trying to update coding history in RDWR mode.
2009-01-10 Erik de Castro Lopo <erikd AT mega-nerd DOT com>

View File

@ -166,6 +166,17 @@ main (int argc, char *argv [])
exit (1) ;
} ;
if (info.coding_history != NULL && filenames [1] == NULL)
{ printf ("\n"
"Error : Trying to update coding history of an existing file which unfortunately\n"
" is not supported. Instead, create a new file using :\n"
"\n"
" %s --bext-coding-hist \"Coding history\" old_file.wav new_file.wav\n"
"\n",
progname) ;
exit (1) ;
} ;
sfe_apply_metadata_changes (filenames, &info) ;
return 0 ;