Skip to content

Commit

Permalink
Assert syntax of avifCodecVersions() in avifenc
Browse files Browse the repository at this point in the history
  • Loading branch information
y-guyon committed Feb 21, 2025
1 parent 6ebff44 commit 069b8cc
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions apps/avifenc.c
Original file line number Diff line number Diff line change
Expand Up @@ -2014,6 +2014,8 @@ int main(int argc, char * argv[])
const char svtVersionPrefix[] = "svt [enc]:v";
const char * svtVersionPrefixPos = strstr(versions, svtVersionPrefix);
if (svtVersionPrefixPos == NULL) {
// Make sure the syntax returned by avifCodecVersions() did not change.
assert(strstr(versions, "svt") == NULL && strstr(versions, "SVT") == NULL);
// Let the encode fail later because SVT was not included in the build.
} else {
const char * svtVersion = svtVersionPrefixPos + strlen(svtVersionPrefix);
Expand Down

0 comments on commit 069b8cc

Please sign in to comment.