Commit 12a073f7 authored by Paul B Mahol's avatar Paul B Mahol

avfilter/buffersrc: stop passing AV_NOPTS_VALUE on EOF

parent 4abf42ab
......@@ -61,6 +61,7 @@ typedef struct BufferSourceContext {
AVChannelLayout ch_layout;
int eof;
int64_t last_pts;
} BufferSourceContext;
#define CHECK_VIDEO_PARAM_CHANGE(s, c, width, height, format, pts)\
......@@ -191,10 +192,12 @@ FF_ENABLE_DEPRECATION_WARNINGS
s->nb_failed_requests = 0;
if (!frame)
return av_buffersrc_close(ctx, AV_NOPTS_VALUE, flags);
return av_buffersrc_close(ctx, s->last_pts, flags);
if (s->eof)
return AVERROR(EINVAL);
s->last_pts = frame->pts + frame->duration;
refcounted = !!frame->buf[0];
if (!(flags & AV_BUFFERSRC_FLAG_NO_CHECK_FORMAT)) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment