Message ID | 20181225213717.17393-1-cus@passwd.hu |
---|---|
State | Accepted |
Headers | show |
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@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
Marton Balint (2018-12-25): > 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> > --- > libavfilter/af_asetnsamples.c | 6 ++++++ > 1 file changed, 6 insertions(+) Sorry, it slipped my mind. LGTM, but I do not maintain that file. Regards,
On Sun, 30 Dec 2018, Nicolas George wrote: > Marton Balint (2018-12-25): >> 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> >> --- >> libavfilter/af_asetnsamples.c | 6 ++++++ >> 1 file changed, 6 insertions(+) > > Sorry, it slipped my mind. LGTM, but I do not maintain that file. Thanks, applied with an additional fix to free pad_frame as well on error. Regards, Marton
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,
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> --- libavfilter/af_asetnsamples.c | 6 ++++++ 1 file changed, 6 insertions(+)