Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Clang doesn't like the forward declaration of the templates, so move them to the header file where they should belong.
The current way might actually be ill-formed, but GCC is pretty lax about template stuff in my experience so that's why it may be working.
Changes
Fix Clang link error
Fix deprecated warning for AVCodecContext::frame_number. This warning is present on the version of libav libraries that ship with Ubuntu 24.04.
Remove unnecessary
std::bind
for spawning hashing threads in VpdqHasher ctorThis is not required to fix the build but generally much better practice. Since we're touching this area I made this change now.
This is the only change to the code while moving from
hasher.cpp
tohasher.h
See Herb Sutter's recommendation for this Add rule about preferring lambdas to std::bind isocpp/CppCoreGuidelines#1796
Test Plan
Local build and CI passes successfully.
Build and regtest pass on M2 Pro macos Sonoma with Clang with FFmpeg 7.0 installed with brew.