Originally committed as revision 26324 to svn://svn.ffmpeg.org/ffmpeg/trunk
Unified · Split
| @@ -78,6 +78,9 @@ void av_get_channel_layout_string(char *buf, int buf_size, · 77 unmodified lines | |||
| 78 | { | 78 | { |
| 79 | int i; | 79 | int i; |
| 80 | 80 | ||
| 81 | if (nb_channels <= 0) | ||
| 82 | nb_channels = av_get_channel_layout_nb_channels(channel_layout); | ||
| 83 | |||
| 81 | for (i = 0; channel_layout_map[i].name; i++) | 84 | for (i = 0; channel_layout_map[i].name; i++) |
| 82 | if (nb_channels == channel_layout_map[i].nb_channels && | 85 | if (nb_channels == channel_layout_map[i].nb_channels && |
| 83 | channel_layout == channel_layout_map[i].layout) { | 86 | channel_layout == channel_layout_map[i].layout) { |
| @@ -80,6 +80,7 @@ int64_t av_get_channel_layout(const char *name); · 79 unmodified lines | |||
| 80 | 80 | ||
| 81 | /** | 81 | /** |
| 82 | * Return a description of a channel layout. | 82 | * Return a description of a channel layout. |
| 83 | * If nb_channels is <= 0, it is guessed from the channel_layout. | ||
| 83 | * | 84 | * |
| 84 | * @param buf put here the string containing the channel layout | 85 | * @param buf put here the string containing the channel layout |
| 85 | * @param buf_size size in bytes of the buffer | 86 | * @param buf_size size in bytes of the buffer |
| @@ -28,7 +28,7 @@ · 27 unmodified lines | |||
| 28 | 28 | ||
| 29 | #define LIBAVCORE_VERSION_MAJOR 0 | 29 | #define LIBAVCORE_VERSION_MAJOR 0 |
| 30 | #define LIBAVCORE_VERSION_MINOR 16 | 30 | #define LIBAVCORE_VERSION_MINOR 16 |
| 31 | #define LIBAVCORE_VERSION_MICRO 0 | 31 | #define LIBAVCORE_VERSION_MICRO 1 |
| 32 | 32 | ||
| 33 | #define LIBAVCORE_VERSION_INT AV_VERSION_INT(LIBAVCORE_VERSION_MAJOR, \ | 33 | #define LIBAVCORE_VERSION_INT AV_VERSION_INT(LIBAVCORE_VERSION_MAJOR, \ |
| 34 | LIBAVCORE_VERSION_MINOR, \ | 34 | LIBAVCORE_VERSION_MINOR, \ |