Wrong deadbeef API check

Issue #4 resolved
Alexey Yakovenko created an issue

I was reading some replaygain-related code, and noticed this:

https://bitbucket.org/Lithopsian/deadbeef-opus/src/fd9333bfaea9e9cdb7140a7bd0970d0ab1841857/opus.c?at=master&fileviewer=file-view-default#opus.c-691

You're checking this at compile time.

If the plugin has been compiled with latest deadbeef.h, but runs with old deadbeef version -- the plugin won't run the code in the #if.

it should be doing a runtime check instead:

if (deadbeef->version_minor < 10)

It looks like this same issue is present in many places there.

Comments (3)

  1. Ian Nartowicz repo owner

    The plugin should refuse to play with APIs older than the one it was compiled for. Too many complications with compile-time and run-time differences to support all APIs in one binary but don't want to completely drop old version support yet.

  2. Log in to comment