[FFmpeg-devel] [PATCH] avfilter/af_asetnsamples: fix last frame props

Marton Balint cus at passwd.hu
Sun Dec 30 20:57:12 EET 2018



On Tue, 25 Dec 2018, Marton Balint wrote:

> 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>
> ---
> libavfilter/af_asetnsamples.c | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/libavfilter/af_asetnsamples.c b/libavfilter/af_asetnsamples.c
> index e8daec8d8f..ea20d66ac5 100644
> --- a/libavfilter/af_asetnsamples.c
> +++ b/libavfilter/af_asetnsamples.c
> @@ -76,6 +76,12 @@ static int activate(AVFilterContext *ctx)
>             return AVERROR(ENOMEM);
>         }
> 
> +        ret = av_frame_copy_props(pad_frame, frame);
> +        if (ret < 0) {
> +            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,

Ping, will apply soon.

Regards,
Marton


More information about the ffmpeg-devel mailing list