avfilter/vf_signature: Dont crash on no frames

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 3d5f03bbc8)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
release/6.1
Michael Niedermayer 11 months ago
parent 243359fc78
commit 5bb9d8affe
No known key found for this signature in database
GPG Key ID: B18E8928B3948D64
  1. 3
      libavfilter/vf_signature.c

@ -384,6 +384,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);

Loading…
Cancel
Save