]> rtime.felk.cvut.cz Git - frescor/ffmpeg.git/commitdiff
Prevent users from setting -vol and -acodec copy together.
authorramiro <ramiro@9553f0bf-9b14-0410-a0b8-cfaf0461ba5b>
Sat, 12 Jul 2008 11:43:21 +0000 (11:43 +0000)
committerramiro <ramiro@9553f0bf-9b14-0410-a0b8-cfaf0461ba5b>
Sat, 12 Jul 2008 11:43:21 +0000 (11:43 +0000)
They are incompatible since the frames are not decoded, so they can't be preprocessed.

git-svn-id: file:///var/local/repositories/ffmpeg/trunk@14178 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b

ffmpeg.c

index bcd9358b46543577baa8ae173c1644623c63e81b..fcd6dd40c1e6779a0f7a50b4b3295746acc08c15 100644 (file)
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -1686,6 +1686,10 @@ static int av_encode(AVFormatContext **output_files,
                 codec->time_base = ist->st->time_base;
             switch(codec->codec_type) {
             case CODEC_TYPE_AUDIO:
+                if(audio_volume != 256) {
+                    fprintf(stderr,"-acodec copy and -vol are incompatible (frames are not decoded)\n");
+                    av_exit(1);
+                }
                 codec->sample_rate = icodec->sample_rate;
                 codec->channels = icodec->channels;
                 codec->frame_size = icodec->frame_size;