aboutsummaryrefslogtreecommitdiffstats
path: root/ffmpeg.c
diff options
context:
space:
mode:
authorJustin Ruggles <justin.ruggles@gmail.com>2009-04-19 14:05:55 +0000
committerJustin Ruggles <justin.ruggles@gmail.com>2009-04-19 14:05:55 +0000
commitbe233a569165ad39a63ff2137763a123cd4f2562 (patch)
treee4445370847f8297dad61cf77ed50443cae64fa1 /ffmpeg.c
parentdc1ed614328edaf05745925392a2765c0ed49c92 (diff)
downloadffmpeg-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.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/ffmpeg.c b/ffmpeg.c
index 200d57dfef..c050512ae2 100644
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -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;