You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-10 06:10:52 +02:00
avfilter/buffersrc: stop passing AV_NOPTS_VALUE on EOF
This commit is contained in:
@@ -61,6 +61,7 @@ typedef struct BufferSourceContext {
|
|||||||
AVChannelLayout ch_layout;
|
AVChannelLayout ch_layout;
|
||||||
|
|
||||||
int eof;
|
int eof;
|
||||||
|
int64_t last_pts;
|
||||||
} BufferSourceContext;
|
} BufferSourceContext;
|
||||||
|
|
||||||
#define CHECK_VIDEO_PARAM_CHANGE(s, c, width, height, format, pts)\
|
#define CHECK_VIDEO_PARAM_CHANGE(s, c, width, height, format, pts)\
|
||||||
@@ -191,10 +192,12 @@ FF_ENABLE_DEPRECATION_WARNINGS
|
|||||||
s->nb_failed_requests = 0;
|
s->nb_failed_requests = 0;
|
||||||
|
|
||||||
if (!frame)
|
if (!frame)
|
||||||
return av_buffersrc_close(ctx, AV_NOPTS_VALUE, flags);
|
return av_buffersrc_close(ctx, s->last_pts, flags);
|
||||||
if (s->eof)
|
if (s->eof)
|
||||||
return AVERROR(EINVAL);
|
return AVERROR(EINVAL);
|
||||||
|
|
||||||
|
s->last_pts = frame->pts + frame->duration;
|
||||||
|
|
||||||
refcounted = !!frame->buf[0];
|
refcounted = !!frame->buf[0];
|
||||||
|
|
||||||
if (!(flags & AV_BUFFERSRC_FLAG_NO_CHECK_FORMAT)) {
|
if (!(flags & AV_BUFFERSRC_FLAG_NO_CHECK_FORMAT)) {
|
||||||
|
Reference in New Issue
Block a user