diff options
author | Nicolas George <nicolas.george@normalesup.org> | 2012-09-12 19:34:21 +0200 |
---|---|---|
committer | Nicolas George <nicolas.george@normalesup.org> | 2012-09-13 11:52:49 +0200 |
commit | 05e64b51bba71ee821adaa7f75a5161455bb972f (patch) | |
tree | d0e152b81edc97f925e336605b4a793aa7892861 /libavfilter | |
parent | 3593f577b0ac9dd77e3fa83f6dde6280e67fa2ab (diff) | |
download | ffmpeg-05e64b51bba71ee821adaa7f75a5161455bb972f.tar.gz |
lavfi/aresample: set buffer properties after copy.
The aresample filter changes the format, layout and/or sample rate,
it can not copy them blindly from its input.
Fix trac ticket 1671 because af_volume uses the properties from the
buffer and not from the link.
Diffstat (limited to 'libavfilter')
-rw-r--r-- | libavfilter/af_aresample.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/libavfilter/af_aresample.c b/libavfilter/af_aresample.c index 8ead3147a9..90e87813df 100644 --- a/libavfilter/af_aresample.c +++ b/libavfilter/af_aresample.c @@ -176,6 +176,9 @@ static void filter_samples(AVFilterLink *inlink, AVFilterBufferRef *insamplesref avfilter_copy_buffer_ref_props(outsamplesref, insamplesref); + outsamplesref->format = outlink->format; + outsamplesref->audio->channel_layout = outlink->channel_layout; + outsamplesref->audio->sample_rate = outlink->sample_rate; if(insamplesref->pts != AV_NOPTS_VALUE) { int64_t inpts = av_rescale(insamplesref->pts, inlink->time_base.num * (int64_t)outlink->sample_rate * inlink->sample_rate, inlink->time_base.den); |