History

avfilter/vf_signature: Dont crash on no frames

Michael Niedermayer committed 2 years ago

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

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
379 FILE* f;379 FILE* f;
380 unsigned int pot3[5] = { 3*3*3*3, 3*3*3, 3*3, 3, 1 };380 unsigned int pot3[5] = { 3*3*3*3, 3*3*3, 3*3, 3, 1 };
381 381
382 if (!sc->coarseend->last)
383 return AVERROR(EINVAL); // No frames ?
384
382 f = avpriv_fopen_utf8(filename, "w");385 f = avpriv_fopen_utf8(filename, "w");
383 if (!f) {386 if (!f) {
384 int err = AVERROR(EINVAL);387 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