History

avfilter/vf_signature: Dont crash on no frames

Michael Niedermayer committed 2 years ago

Commit 3d5f03b1 parent bba6df91 file · +3 −0Browse files

Showing the changes to libavfilter (1 of 1 file). Show all

Unified · Split

libavfilter/vf_signature.c+3−0
@@ -379,6 +379,9 @@ static int xml_export(AVFilterContext *ctx, StreamContext *sc, const char* filen · 378 unmodified lines
379379 FILE* f;
380380 unsigned int pot3[5] = { 3*3*3*3, 3*3*3, 3*3, 3, 1 };
381381
382+ if (!sc->coarseend->last)
383+ return AVERROR(EINVAL); // No frames ?
384+
382385 f = avpriv_fopen_utf8(filename, "w");
383386 if (!f) {
384387 int err = AVERROR(EINVAL);

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t