diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-04-17 22:18:21 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-04-18 00:28:06 +0200 |
commit | 123272374180d8dc3ce9dff50f0c77d5b3b3341f (patch) | |
tree | 2c2add85161e74ebe6d4301a6607adc521112582 /ffmpeg.c | |
parent | a66675268f63dd6794ce946c7edbcb8b49ae0f13 (diff) | |
parent | 0f96f0d9968a767ead3aec823fcdfb78f26f7be7 (diff) | |
download | ffmpeg-streaming-123272374180d8dc3ce9dff50f0c77d5b3b3341f.zip ffmpeg-streaming-123272374180d8dc3ce9dff50f0c77d5b3b3341f.tar.gz |
Merge remote-tracking branch 'qatar/master'
* qatar/master:
aacenc: Fix issues with huge values of bit_rate.
dv_tablegen: Drop unnecessary av_unused attribute from dv_vlc_map_tableinit().
proresenc: multithreaded quantiser search
riff: use bps instead of bits_per_coded_sample in the WAVEFORMATEXTENSIBLE header
avconv: only set the "channels" option when it exists for the specified input format
avplay: update get_buffer to be inline with avconv
aacdec: More robust output configuration.
faac: Fix multi-channel ordering
faac: Add .channel_layouts
rtmp: Support 'rtmp_playpath', an option which overrides the stream identifier
rtmp: Support 'rtmp_app', an option which overrides the name of application
avutil: add better documentation for AVSampleFormat
Conflicts:
libavcodec/aac.h
libavcodec/aacdec.c
libavcodec/aacenc.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'ffmpeg.c')
-rw-r--r-- | ffmpeg.c | 12 |
1 files changed, 10 insertions, 2 deletions
@@ -4189,8 +4189,16 @@ static int opt_input_file(OptionsContext *o, const char *opt, const char *filena av_dict_set(&format_opts, "sample_rate", buf, 0); } if (o->nb_audio_channels) { - snprintf(buf, sizeof(buf), "%d", o->audio_channels[o->nb_audio_channels - 1].u.i); - av_dict_set(&format_opts, "channels", buf, 0); + /* because we set audio_channels based on both the "ac" and + * "channel_layout" options, we need to check that the specified + * demuxer actually has the "channels" option before setting it */ + if (file_iformat && file_iformat->priv_class && + av_opt_find(&file_iformat->priv_class, "channels", NULL, 0, + AV_OPT_SEARCH_FAKE_OBJ)) { + snprintf(buf, sizeof(buf), "%d", + o->audio_channels[o->nb_audio_channels - 1].u.i); + av_dict_set(&format_opts, "channels", buf, 0); + } } if (o->nb_frame_rates) { av_dict_set(&format_opts, "framerate", o->frame_rates[o->nb_frame_rates - 1].u.str, 0); |