Skip to content

Fix vexing-parse AvLog declarations and bitwise operator bugs#301

Open
skal-aa wants to merge 1 commit into
ponchio:masterfrom
skal-aa:skal/fix
Open

Fix vexing-parse AvLog declarations and bitwise operator bugs#301
skal-aa wants to merge 1 commit into
ponchio:masterfrom
skal-aa:skal/fix

Conversation

@skal-aa

@skal-aa skal-aa commented Apr 14, 2026

Copy link
Copy Markdown

Replace AvLog useAvLog() with AvLog useAvLog{} in four files to fix the most-vexing-parse: the old form declared a function, so the RAII log guard was never actually constructed.

Replace && with & in codecstats.cpp and mp4.cpp where bitwise AND was clearly intended (masking with 0x0000ffff / 0xff00ffff).

  • simple Makefile for MacOS

The libav linker errors on macOS (missing libavutil.a, CoreFoundation, CoreVideo, VideoDecodeAcceleration, bz2) are fixed by building the library first (make in libav/) and appending the framework/lib flags:
-lbz2 -framework CoreFoundation -framework CoreVideo
-framework VideoDecodeAcceleration

Replace `AvLog useAvLog()` with `AvLog useAvLog{}` in four files to fix
the most-vexing-parse: the old form declared a function, so the RAII log
guard was never actually constructed.

Replace `&&` with `&` in codecstats.cpp and mp4.cpp where bitwise AND
was clearly intended (masking with 0x0000ffff / 0xff00ffff).

The libav linker errors on macOS (missing libavutil.a, CoreFoundation,
CoreVideo, VideoDecodeAcceleration, bz2) are fixed by building the
library first (`make` in libav/) and appending the framework/lib flags:
  -lbz2 -framework CoreFoundation -framework CoreVideo \
  -framework VideoDecodeAcceleration
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants