Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHendrik Leppkes <h.leppkes@gmail.com>2015-09-05 21:36:19 +0300
committerHendrik Leppkes <h.leppkes@gmail.com>2015-09-05 21:36:19 +0300
commitd83dd630a09d310463b525c6471c8d8f47fd20ec (patch)
tree9eb33752a16b3b79d22aa05a6fb1790a7e12036e /libavutil/channel_layout.c
parent251fb7dcd4865a9821fc238dbcc674e57080c91e (diff)
lavu: Drop FF_API_GET_CHANNEL_LAYOUT_COMPAT cruft
FATE refs changed to accomodate for the new default behavior of the function. Numbers are now interpreted as a channel layout, instead of a number of channels.
Diffstat (limited to 'libavutil/channel_layout.c')
-rw-r--r--libavutil/channel_layout.c38
1 files changed, 0 insertions, 38 deletions
diff --git a/libavutil/channel_layout.c b/libavutil/channel_layout.c
index f72b2cf00c..a59ba4610f 100644
--- a/libavutil/channel_layout.c
+++ b/libavutil/channel_layout.c
@@ -106,11 +106,7 @@ static const struct {
{ "downmix", 2, AV_CH_LAYOUT_STEREO_DOWNMIX, },
};
-#if FF_API_GET_CHANNEL_LAYOUT_COMPAT
-static uint64_t get_channel_layout_single(const char *name, int name_len, int compat)
-#else
static uint64_t get_channel_layout_single(const char *name, int name_len)
-#endif
{
int i;
char *end;
@@ -128,27 +124,8 @@ static uint64_t get_channel_layout_single(const char *name, int name_len)
return (int64_t)1 << i;
i = strtol(name, &end, 10);
-#if FF_API_GET_CHANNEL_LAYOUT_COMPAT
- if (compat) {
- if (end - name == name_len ||
- (end + 1 - name == name_len && *end == 'c')) {
- layout = av_get_default_channel_layout(i);
- if (end - name == name_len) {
- av_log(NULL, AV_LOG_WARNING,
- "Single channel layout '%.*s' is interpreted as a number of channels, "
- "switch to the syntax '%.*sc' otherwise it will be interpreted as a "
- "channel layout number in a later version\n",
- name_len, name, name_len, name);
- }
- return layout;
- }
- } else {
-#endif
if ((end + 1 - name == name_len && *end == 'c'))
return av_get_default_channel_layout(i);
-#if FF_API_GET_CHANNEL_LAYOUT_COMPAT
- }
-#endif
layout = strtoll(name, &end, 0);
if (end - name == name_len)
@@ -156,11 +133,7 @@ static uint64_t get_channel_layout_single(const char *name, int name_len)
return 0;
}
-#if FF_API_GET_CHANNEL_LAYOUT_COMPAT
-uint64_t ff_get_channel_layout(const char *name, int compat)
-#else
uint64_t av_get_channel_layout(const char *name)
-#endif
{
const char *n, *e;
const char *name_end = name + strlen(name);
@@ -168,11 +141,7 @@ uint64_t av_get_channel_layout(const char *name)
for (n = name; n < name_end; n = e + 1) {
for (e = n; e < name_end && *e != '+' && *e != '|'; e++);
-#if FF_API_GET_CHANNEL_LAYOUT_COMPAT
- layout_single = get_channel_layout_single(n, e - n, compat);
-#else
layout_single = get_channel_layout_single(n, e - n);
-#endif
if (!layout_single)
return 0;
layout |= layout_single;
@@ -180,13 +149,6 @@ uint64_t av_get_channel_layout(const char *name)
return layout;
}
-#if FF_API_GET_CHANNEL_LAYOUT_COMPAT
-uint64_t av_get_channel_layout(const char *name)
-{
- return ff_get_channel_layout(name, 1);
-}
-#endif
-
void av_bprint_channel_layout(struct AVBPrint *bp,
int nb_channels, uint64_t channel_layout)
{