diff options
author | Stefano Sabatini <stefano.sabatini-lala@poste.it> | 2010-11-21 20:06:22 +0000 |
---|---|---|
committer | Stefano Sabatini <stefano.sabatini-lala@poste.it> | 2010-11-21 20:06:22 +0000 |
commit | 63e8d9760f23a4edf81e9ae58c4f6d3baa6ff4dd (patch) | |
tree | c2a7e585f116b18204d49b0a779d2549485518a0 /libavfilter/asrc_anullsrc.c | |
parent | d6e602536c049a952969e95bb8f3897f5d46b914 (diff) | |
download | ffmpeg-63e8d9760f23a4edf81e9ae58c4f6d3baa6ff4dd.tar.gz |
Use the new libavcore audio channel API.
This also allows to remove a linking dependency of libavfilter on
libavcodec.
Originally committed as revision 25789 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavfilter/asrc_anullsrc.c')
-rw-r--r-- | libavfilter/asrc_anullsrc.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/libavfilter/asrc_anullsrc.c b/libavfilter/asrc_anullsrc.c index e1c6480e2c..306e0a3d5a 100644 --- a/libavfilter/asrc_anullsrc.c +++ b/libavfilter/asrc_anullsrc.c @@ -22,7 +22,7 @@ */ #include "avfilter.h" -#include "libavcodec/audioconvert.h" +#include "libavcore/audioconvert.h" typedef struct { int64_t channel_layout; @@ -35,7 +35,7 @@ static int init(AVFilterContext *ctx, const char *args, void *opaque) char channel_layout_str[128] = ""; priv->sample_rate = 44100; - priv->channel_layout = CH_LAYOUT_STEREO; + priv->channel_layout = AV_CH_LAYOUT_STEREO; if (args) sscanf(args, "%"PRId64":%s", &priv->sample_rate, channel_layout_str); @@ -46,7 +46,7 @@ static int init(AVFilterContext *ctx, const char *args, void *opaque) } if (*channel_layout_str) - if (!(priv->channel_layout = avcodec_get_channel_layout(channel_layout_str)) + if (!(priv->channel_layout = av_get_channel_layout(channel_layout_str)) && sscanf(channel_layout_str, "%"PRId64, &priv->channel_layout) != 1) { av_log(ctx, AV_LOG_ERROR, "Invalid value '%s' for channel layout\n", channel_layout_str); @@ -65,8 +65,8 @@ static int config_props(AVFilterLink *outlink) outlink->sample_rate = priv->sample_rate; outlink->channel_layout = priv->channel_layout; - chans_nb = avcodec_channel_layout_num_channels(priv->channel_layout); - avcodec_get_channel_layout_string(buf, sizeof(buf), chans_nb, priv->channel_layout); + chans_nb = av_get_channel_layout_nb_channels(priv->channel_layout); + av_get_channel_layout_string(buf, sizeof(buf), chans_nb, priv->channel_layout); av_log(outlink->src, AV_LOG_INFO, "sample_rate:%"PRId64 " channel_layout:%"PRId64 " channel_layout_description:'%s'\n", priv->sample_rate, priv->channel_layout, buf); |