diff options
author | Anton Khirnov <anton@khirnov.net> | 2014-02-19 23:42:39 +0400 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2014-02-24 20:30:48 +0400 |
commit | dcc7e4bf1d0913123bfafbc58bf47bd41dd5848d (patch) | |
tree | 8dabe4f6f27bcedce1d3d6622a8da311be17557a /libavfilter | |
parent | 67f2a688143b644f99360565a9f36c61a5f052e9 (diff) |
af_resample: preserve frame properties
Diffstat (limited to 'libavfilter')
-rw-r--r-- | libavfilter/af_resample.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/libavfilter/af_resample.c b/libavfilter/af_resample.c index 224e0ed28c..a89ab35e5c 100644 --- a/libavfilter/af_resample.c +++ b/libavfilter/af_resample.c @@ -252,6 +252,14 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in) if (ret > 0) { out->nb_samples = ret; + + ret = av_frame_copy_props(out, in); + if (ret < 0) { + av_frame_free(&out); + goto fail; + } + + out->sample_rate = outlink->sample_rate; if (in->pts != AV_NOPTS_VALUE) { out->pts = av_rescale_q(in->pts, inlink->time_base, outlink->time_base) - |