aboutsummaryrefslogtreecommitdiffstats
path: root/ffmpeg.c
diff options
context:
space:
mode:
authorFabrice Bellard <fabrice@bellard.org>2001-09-19 21:39:25 +0000
committerFabrice Bellard <fabrice@bellard.org>2001-09-19 21:39:25 +0000
commite30a28468794efdfa8fcadf54ef14ff39736166b (patch)
tree502357d38bf73d77a3689b0cdf0f187dd5f56879 /ffmpeg.c
parentda115c8a3e663876643f7e66ee7a55b31ea148f3 (diff)
downloadffmpeg-e30a28468794efdfa8fcadf54ef14ff39736166b.tar.gz
oops - forgot grabbing case for audio/video input auto detect
Originally committed as revision 134 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'ffmpeg.c')
-rw-r--r--ffmpeg.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/ffmpeg.c b/ffmpeg.c
index afeef4158f..57c1b78ee3 100644
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -1941,12 +1941,15 @@ void opt_output_file(const char *filename)
use_video = file_format->video_codec != CODEC_ID_NONE;
use_audio = file_format->audio_codec != CODEC_ID_NONE;
- /* disable if no corresponding type found */
- check_audio_video_inputs(&input_has_video, &input_has_audio);
- if (!input_has_video)
- use_video = 0;
- if (!input_has_audio)
- use_audio = 0;
+ /* disable if no corresponding type found and at least one
+ input file */
+ if (nb_input_files > 0) {
+ check_audio_video_inputs(&input_has_video, &input_has_audio);
+ if (!input_has_video)
+ use_video = 0;
+ if (!input_has_audio)
+ use_audio = 0;
+ }
/* manual disable */
if (audio_disable) {