Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul B Mahol <onemda@gmail.com>2022-02-24 22:32:41 +0300
committerPaul B Mahol <onemda@gmail.com>2022-02-24 23:28:23 +0300
commit3715f2f8643695940582ce040b7a052cccfb9db2 (patch)
tree762e4f34be0dd213502fe71fdbd1551bdd6fc230 /libavfilter/vf_tpad.c
parenta2b090da79324abfc522644d66afab01df9699bd (diff)
avfilter/vf_tpad: if there is no frame to clone return early
Diffstat (limited to 'libavfilter/vf_tpad.c')
-rw-r--r--libavfilter/vf_tpad.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/libavfilter/vf_tpad.c b/libavfilter/vf_tpad.c
index e5acece1e4..120dbcb4d3 100644
--- a/libavfilter/vf_tpad.c
+++ b/libavfilter/vf_tpad.c
@@ -148,6 +148,11 @@ static int activate(AVFilterContext *ctx)
frame->data, frame->linesize,
0, 0, frame->width, frame->height);
} else if (s->stop_mode == 1) {
+ if (!s->cache_stop) {
+ s->pad_stop = 0;
+ ff_outlink_set_status(outlink, AVERROR_EOF, s->pts);
+ return 0;
+ }
frame = av_frame_clone(s->cache_stop);
if (!frame)
return AVERROR(ENOMEM);