shithub: opus-tools

Download patch

ref: 0c56dd1660b701d61749862a4c123df3b58057bf
parent: 188a446e597de63b7320b11fcf2d09310149854e
author: Gregory Maxwell <[email protected]>
date: Tue Jan 22 10:03:43 EST 2013

Don't include new title/album/date/genre args in the command-line tag.

We don't save anything in the command-line tag that would leak file
paths or duplicate other metadata.

--- a/src/opusenc.c
+++ b/src/opusenc.c
@@ -479,14 +479,20 @@
           save_cmd=0;
           comment_add(&inopt.comments, &inopt.comments_length, "title", optarg);
         } else if(strcmp(long_options[option_index].name,"album")==0){
+          save_cmd=0;
           comment_add(&inopt.comments, &inopt.comments_length, "album", optarg);
         } else if(strcmp(long_options[option_index].name,"date")==0){
+          save_cmd=0;
           comment_add(&inopt.comments, &inopt.comments_length, "date", optarg);
         } else if(strcmp(long_options[option_index].name,"genre")==0){
+          save_cmd=0;
           comment_add(&inopt.comments, &inopt.comments_length, "genre", optarg);
         } else if(strcmp(long_options[option_index].name,"discard-comments")==0){
           inopt.copy_comments=0;
         }
+        /*Commands whos arguments would leak file paths or just end up as metadata
+           should have save_cmd=0; to prevent them from being saved in the
+           command-line tag.*/
         break;
       case 'h':
         usage();