diff options
author | Justin Ruggles <justin.ruggles@gmail.com> | 2009-04-19 14:05:55 +0000 |
---|---|---|
committer | Justin Ruggles <justin.ruggles@gmail.com> | 2009-04-19 14:05:55 +0000 |
commit | be233a569165ad39a63ff2137763a123cd4f2562 (patch) | |
tree | e4445370847f8297dad61cf77ed50443cae64fa1 /ffmpeg.c | |
parent | dc1ed614328edaf05745925392a2765c0ed49c92 (diff) | |
download | ffmpeg-be233a569165ad39a63ff2137763a123cd4f2562.tar.gz |
Check that channel layout is compatible with number of channels for
output audio stream.
Originally committed as revision 18621 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'ffmpeg.c')
-rw-r--r-- | ffmpeg.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -3212,6 +3212,8 @@ static void new_audio_stream(AVFormatContext *oc) audio_enc->channels = audio_channels; audio_enc->sample_fmt = audio_sample_fmt; audio_enc->channel_layout = channel_layout; + if (avcodec_channel_layout_num_channels(channel_layout) != audio_channels) + audio_enc->channel_layout = 0; if(codec && codec->sample_fmts){ const enum SampleFormat *p= codec->sample_fmts; |