[FFmpeg-cvslog] avfilter/af_asetnsamples: fix last frame props
Marton Balint
git at videolan.org
Tue Jan 1 22:22:37 EET 2019
ffmpeg | branch: release/4.1 | Marton Balint <cus at passwd.hu> | Tue Dec 25 22:26:18 2018 +0100| [ddc284300eb09b516cef96b6242041b410369302] | committer: Marton Balint
avfilter/af_asetnsamples: fix last frame props
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 at passwd.hu>
(cherry picked from commit f9e947845f9ac5ccb84cf5e6f4121ec2e23b9946)
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=ddc284300eb09b516cef96b6242041b410369302
---
libavfilter/af_asetnsamples.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/libavfilter/af_asetnsamples.c b/libavfilter/af_asetnsamples.c
index e8daec8d8f..c60ce3063f 100644
--- a/libavfilter/af_asetnsamples.c
+++ b/libavfilter/af_asetnsamples.c
@@ -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,
More information about the ffmpeg-cvslog
mailing list