aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2024-02-12 19:40:07 +0100
committerMichael Niedermayer <michael@niedermayer.cc>2024-03-28 18:07:13 +0100
commit3d5f03bbc8bba2929cc09b07d2731ae5d392e772 (patch)
treef25d2158ed74377f2233ad89706f3fe6d771e4cb
parentbba6df9ac7bd8386d92e1a7f5c737ca4e575fccf (diff)
downloadffmpeg-3d5f03bbc8bba2929cc09b07d2731ae5d392e772.tar.gz
avfilter/vf_signature: Dont crash on no frames
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r--libavfilter/vf_signature.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/libavfilter/vf_signature.c b/libavfilter/vf_signature.c
index 758b6e5101..3858fe3070 100644
--- a/libavfilter/vf_signature.c
+++ b/libavfilter/vf_signature.c
@@ -379,6 +379,9 @@ static int xml_export(AVFilterContext *ctx, StreamContext *sc, const char* filen
FILE* f;
unsigned int pot3[5] = { 3*3*3*3, 3*3*3, 3*3, 3, 1 };
+ if (!sc->coarseend->last)
+ return AVERROR(EINVAL); // No frames ?
+
f = avpriv_fopen_utf8(filename, "w");
if (!f) {
int err = AVERROR(EINVAL);