comparison audioconvert.c @ 9511:c2dba7ed94dc libavcodec

Check that channel layout is compatible with number of channels for output audio stream.
author jbr
date Sun, 19 Apr 2009 14:05:55 +0000
parents 56f844aec27b
children 63dbab428e01
comparison
equal deleted inserted replaced
9510:f0f37cb6e3e5 9511:c2dba7ed94dc
149 ch++; 149 ch++;
150 } 150 }
151 } 151 }
152 av_strlcat(buf, ")", buf_size); 152 av_strlcat(buf, ")", buf_size);
153 } 153 }
154 }
155
156 int avcodec_channel_layout_num_channels(int64_t channel_layout)
157 {
158 int count;
159 uint64_t x = channel_layout;
160 for (count = 0; x; count++)
161 x &= x-1; // unset lowest set bit
162 return count;
154 } 163 }
155 164
156 struct AVAudioConvert { 165 struct AVAudioConvert {
157 int in_channels, out_channels; 166 int in_channels, out_channels;
158 int fmt_pair; 167 int fmt_pair;