diff options
author | Marton Balint <cus@passwd.hu> | 2018-12-25 22:26:18 +0100 |
---|---|---|
committer | Marton Balint <cus@passwd.hu> | 2018-12-30 20:05:34 +0100 |
commit | f9e947845f9ac5ccb84cf5e6f4121ec2e23b9946 (patch) | |
tree | a7c901898ab7479f6675fa6594da54a48292c792 /libavfilter/af_asetnsamples.c | |
parent | b6b3159b04afab4f57ce788a5f4871244385f478 (diff) | |
download | ffmpeg-f9e947845f9ac5ccb84cf5e6f4121ec2e23b9946.tar.gz |
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@passwd.hu>
Diffstat (limited to 'libavfilter/af_asetnsamples.c')
-rw-r--r-- | libavfilter/af_asetnsamples.c | 7 |
1 files changed, 7 insertions, 0 deletions
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, |