[FFmpeg-cvslog] af_resample: preserve frame properties

Anton Khirnov git at videolan.org
Mon Mar 3 23:27:06 CET 2014


ffmpeg | branch: release/2.2 | Anton Khirnov <anton at khirnov.net> | Wed Feb 19 20:42:39 2014 +0100| [7933039ade01b39638ec3d9e638b6ae06ee84984] | committer: Reinhard Tartler

af_resample: preserve frame properties

(cherry picked from commit dcc7e4bf1d0913123bfafbc58bf47bd41dd5848d)

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=7933039ade01b39638ec3d9e638b6ae06ee84984
---

 libavfilter/af_resample.c |    8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/libavfilter/af_resample.c b/libavfilter/af_resample.c
index 224e0ed..a89ab35 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) -



More information about the ffmpeg-cvslog mailing list