Browse Source

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 ef3babb2c7.

Signed-off-by: Marton Balint <cus@passwd.hu>
tags/n4.2
Marton Balint 7 years ago
parent
commit
f9e947845f
1 changed files with 7 additions and 0 deletions
  1. +7
    -0
      libavfilter/af_asetnsamples.c

+ 7
- 0
libavfilter/af_asetnsamples.c View 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,


Loading…
Cancel
Save