We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bea14c4 commit d871b7fCopy full SHA for d871b7f
source/ffmpeg-cpp/ffmpeg-cpp/Frame Sinks/Filter.cpp
@@ -147,10 +147,12 @@ namespace ffmpegcpp
147
// this is an audio input stream
148
else if (metaData->type == AVMEDIA_TYPE_AUDIO)
149
{
150
+ uint64_t channelLayout = frame->channel_layout;
151
+ if (channelLayout == 0) channelLayout = av_get_default_channel_layout(frame->channels);
152
snprintf(args, argsLength,
153
"time_base=%d/%d:sample_rate=%d:sample_fmt=%s:channel_layout=0x%d",
154
metaData->timeBase.num, metaData->timeBase.den, frame->sample_rate,
- av_get_sample_fmt_name((AVSampleFormat)frame->format), frame->channel_layout);
155
+ av_get_sample_fmt_name((AVSampleFormat)frame->format), channelLayout);
156
}
157
158
// not supported
0 commit comments