forked from FFmpeg/FFmpeg
avfilter/buffersrc: stop passing AV_NOPTS_VALUE on EOF
This commit is contained in:
parent
4abf42ab96
commit
12a073f72c
1 changed files with 4 additions and 1 deletions
|
@ -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)) {
|
||||
|
|
Loading…
Add table
Reference in a new issue