[FFmpeg-trac] #11420(ffmpeg:new): macos clang -O3 produce buggy ffmpeg: output is rotated 90 degree.
FFmpeg
trac at avcodec.org
Tue Jan 14 17:06:56 EET 2025
#11420: macos clang -O3 produce buggy ffmpeg: output is rotated 90 degree.
-------------------------------------+-------------------------------------
Reporter: ffmpeg- | Type: defect
fixes |
Status: new | Priority: important
Component: ffmpeg | Version:
Keywords: clang | unspecified
rotated | Blocked By:
Blocking: | Reproduced by developer: 0
Analyzed by developer: 0 |
-------------------------------------+-------------------------------------
Summary of the bug:
compile with clang, CFLAGS=" -O3" ./configure, ffmpeg output is rotated 90
degree by default, tested on ffmpeg 6.1.2, 7.1 and latest git, all the
same. work around is rolling back to ffmpeg 5.1.5, or drop the '-O3' flag.
could be some 'volatile' keyword missing, to prevent the compiler from
optimizing away some variables.
How to reproduce:
CC=/usr/bin/clang \
CXX=/usr/bin/clang++ \
LDFLAGS=" -O3 ....._some_other_flags" \
CFLAGS=" -O3 ....._some_other_flags" \
CXXFLAGS="-O3 ....._some_other_flags" \
CPPFLAGS="-O3 ....._some_other_flags" \
./configure
make -j8
{{{
% ffmpeg -i in.mp4 out.mp4 -y
ffmpeg 6.1.2, 7.1 and latest git
built on Apple clang version 15.0.0 (clang-1500.3.9.4)
Target: x86_64-apple-darwin23.5.0
}}}
--
Ticket URL: <https://trac.ffmpeg.org/ticket/11420>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker
More information about the FFmpeg-trac
mailing list