mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
Make av_get_channel_layout_string() guess the number of channels if it
was not provided. Originally committed as revision 26324 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
caeb0c3027
commit
8b69c2f463
@ -78,6 +78,9 @@ void av_get_channel_layout_string(char *buf, int buf_size,
|
|||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
|
if (nb_channels <= 0)
|
||||||
|
nb_channels = av_get_channel_layout_nb_channels(channel_layout);
|
||||||
|
|
||||||
for (i = 0; channel_layout_map[i].name; i++)
|
for (i = 0; channel_layout_map[i].name; i++)
|
||||||
if (nb_channels == channel_layout_map[i].nb_channels &&
|
if (nb_channels == channel_layout_map[i].nb_channels &&
|
||||||
channel_layout == channel_layout_map[i].layout) {
|
channel_layout == channel_layout_map[i].layout) {
|
||||||
|
@ -80,6 +80,7 @@ int64_t av_get_channel_layout(const char *name);
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Return a description of a channel layout.
|
* Return a description of a channel layout.
|
||||||
|
* If nb_channels is <= 0, it is guessed from the channel_layout.
|
||||||
*
|
*
|
||||||
* @param buf put here the string containing the channel layout
|
* @param buf put here the string containing the channel layout
|
||||||
* @param buf_size size in bytes of the buffer
|
* @param buf_size size in bytes of the buffer
|
||||||
|
@ -28,7 +28,7 @@
|
|||||||
|
|
||||||
#define LIBAVCORE_VERSION_MAJOR 0
|
#define LIBAVCORE_VERSION_MAJOR 0
|
||||||
#define LIBAVCORE_VERSION_MINOR 16
|
#define LIBAVCORE_VERSION_MINOR 16
|
||||||
#define LIBAVCORE_VERSION_MICRO 0
|
#define LIBAVCORE_VERSION_MICRO 1
|
||||||
|
|
||||||
#define LIBAVCORE_VERSION_INT AV_VERSION_INT(LIBAVCORE_VERSION_MAJOR, \
|
#define LIBAVCORE_VERSION_INT AV_VERSION_INT(LIBAVCORE_VERSION_MAJOR, \
|
||||||
LIBAVCORE_VERSION_MINOR, \
|
LIBAVCORE_VERSION_MINOR, \
|
||||||
|
Loading…
Reference in New Issue
Block a user