[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:08:39 EET 2025
#11420: macos clang -O3 produce buggy ffmpeg: output is rotated 90 degree.
---------------------------------------+----------------------------------
Reporter: ffmpeg-fixes | Owner: (none)
Type: defect | Status: new
Priority: important | Component: ffmpeg
Version: unspecified | Resolution:
Keywords: clang rotated | Blocked By:
Blocking: | Reproduced by developer: 0
Analyzed by developer: 0 |
---------------------------------------+----------------------------------
Description changed by ffmpeg-fixes:
Old description:
> 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
>
> }}}
New description:
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
input: 1920x1080 [SAR 1:1 DAR 16:9]
output: 1080x1920 [SAR 1:1 DAR 9:16]
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#comment:1>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker
More information about the FFmpeg-trac
mailing list