Skip to content

Commit b9bc00f

Browse files
author
Clement Champetier
committed
AudioProperties: fixed getChannelLayout
If channel_layout attribute is not indicated, the method returns the default channel layout which corresponds to the given number of channels.
1 parent 0db7c2e commit b9bc00f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/AvTranscoder/properties/AudioProperties.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ std::string AudioProperties::getChannelLayout() const
7373
throw std::runtime_error("unknown codec context");
7474

7575
char buf1[512];
76-
av_get_channel_layout_string(buf1, sizeof(buf1), -1, _codecContext->channel_layout);
76+
av_get_channel_layout_string(buf1, sizeof(buf1), getNbChannels(), _codecContext->channel_layout);
7777
return std::string(buf1);
7878
}
7979

0 commit comments

Comments
 (0)