avfilter/af_asetnsamples: fix last frame props
authorMarton Balint <cus@passwd.hu>
Tue, 25 Dec 2018 21:26:18 +0000 (22:26 +0100)
committerMarton Balint <cus@passwd.hu>
Tue, 1 Jan 2019 19:39:44 +0000 (20:39 +0100)
Frame properties were not copied, so e.g. PTS was not set for the last frame.

Regression since ef3babb2c70f564dc1634b3f29c6e35a2b2dc239.

Signed-off-by: Marton Balint <cus@passwd.hu>
(cherry picked from commit f9e947845f9ac5ccb84cf5e6f4121ec2e23b9946)

libavfilter/af_asetnsamples.c

index e8daec8..c60ce30 100644 (file)
@@ -76,6 +76,13 @@ static int activate(AVFilterContext *ctx)
             return AVERROR(ENOMEM);
         }
 
+        ret = av_frame_copy_props(pad_frame, frame);
+        if (ret < 0) {
+            av_frame_free(&pad_frame);
+            av_frame_free(&frame);
+            return ret;
+        }
+
         av_samples_copy(pad_frame->extended_data, frame->extended_data,
                         0, 0, frame->nb_samples, frame->channels, frame->format);
         av_samples_set_silence(pad_frame->extended_data, frame->nb_samples,