diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-10-08 13:11:11 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-10-08 13:11:11 +0200 |
commit | 43c157f4a46cb76739f07782d23d1e4ff8da3253 (patch) | |
tree | f74dfcbb6a16498524fa2185ac3160cd224b5c04 /libavfilter | |
parent | d7a473926504e2acfa6ae3bead0938e1f4e03441 (diff) | |
parent | 7b556be6735371d1040c7076547b8198d9fadd34 (diff) | |
download | ffmpeg-43c157f4a46cb76739f07782d23d1e4ff8da3253.tar.gz |
Merge remote-tracking branch 'qatar/master'
* qatar/master:
af_resample: avoid conversion of identical sample formats for 1 channel
avcodec: allow either planar or interleaved sample format when encoding mono
adpcmenc: ensure calls to adpcm_ima_compress_sample() are in the right order
timefilter: De-doxygenize normal code comments and drop silly ones
gxf: Include the right header for the avpriv_frame_rate_tab declaration
Conflicts:
libavcodec/adpcmenc.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavfilter')
-rw-r--r-- | libavfilter/af_resample.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/libavfilter/af_resample.c b/libavfilter/af_resample.c index c51f9d243b..58a9b2a99e 100644 --- a/libavfilter/af_resample.c +++ b/libavfilter/af_resample.c @@ -93,7 +93,11 @@ static int config_output(AVFilterLink *outlink) if (inlink->channel_layout == outlink->channel_layout && inlink->sample_rate == outlink->sample_rate && - inlink->format == outlink->format) + (inlink->format == outlink->format || + (av_get_channel_layout_nb_channels(inlink->channel_layout) == 1 && + av_get_channel_layout_nb_channels(outlink->channel_layout) == 1 && + av_get_planar_sample_fmt(inlink->format) == + av_get_planar_sample_fmt(outlink->format)))) return 0; if (!(s->avr = avresample_alloc_context())) @@ -226,6 +230,7 @@ static int filter_samples(AVFilterLink *inlink, AVFilterBufferRef *buf) fail: avfilter_unref_buffer(buf); } else { + buf->format = outlink->format; ret = ff_filter_samples(outlink, buf); s->got_output = 1; } |