In particular, test writing tags with odd strlen.
(These tags are zero-padded to even size.)
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Both GCC and Clang create code that inlines the loops in
next_input() and next_output() at high optimization
levels (presumably when there are not too many devices)
and this code leads to the creation of .got entries:
e7: 48 3b 3d 00 00 00 00 cmp 0x0(%rip),%rdi # ee <av_input_video_device_next+0xe>
ea: R_X86_64_REX_GOTPCRELX ff_alsa_demuxer-0x4
ee: 74 43 je 133 <av_input_video_device_next+0x53>
f0: 48 3b 3d 00 00 00 00 cmp 0x0(%rip),%rdi # f7 <av_input_video_device_next+0x17>
f3: R_X86_64_REX_GOTPCRELX ff_fbdev_demuxer-0x4
f7: 74 41 je 13a <av_input_video_device_next+0x5a>
These relocations can't be fixed up lateron when it is known
that the symbols exist in the same DSO.
This commit therefore marks these symbols as hidden, leading
to code like this:
f7: 48 8d 05 00 00 00 00 lea 0x0(%rip),%rax # fe <av_input_video_device_next+0xe>
fa: R_X86_64_PC32 ff_alsa_demuxer-0x4
fe: 48 39 c7 cmp %rax,%rdi
101: 74 55 je 158 <av_input_video_device_next+0x68>
103: 48 8d 05 00 00 00 00 lea 0x0(%rip),%rax # 10a <av_input_video_device_next+0x1a>
106: R_X86_64_PC32 ff_fbdev_demuxer-0x4
10a: 48 39 c7 cmp %rax,%rdi
10d: 74 50 je 15f <av_input_video_device_next+0x6f>
(Note: It is actually strange that the compiler creates code
that tries to read the addresses from the .got given that the
addresses can be read directly from indev_list/outdev_list.)
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Avoids .got entries for ff_iamf_scalable_ch_layouts and
ff_iamf_sound_system_map (whether they would have been
created otherwise depends upon the compiler and compiler
options).
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
OptionDef.u is only an offset (i.e. its off member) iff OPT_FLAG_OFFSET
is true. Otherwise, the pointer arithmetic can be undefined behaviour.
UBSan warns about this (on 32bit arches):
src/fftools/ffmpeg_opt.c:102:15: runtime error: pointer index expression with base 0xffa4db10 overflowed to 0x56059a50
This commit fixes this by checking for OPT_FLAG_OFFSET first.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
The documentation correctly states that the rdiv is a multiplier but incorrectly states the default behavior is to multiply by the sum of all matrix elements - it multiplies by 1/sum.
This changes the documentation to match the code.
Address trac #10889
Signed-off-by: Marton Balint <cus@passwd.hu>
Also make initialization/uninitialization behaviour more explicit in the docs,
and make sure we do not leak a channel map on error.
Signed-off-by: Marton Balint <cus@passwd.hu>
Also make use of the av_channel_from_string() function to determine the channel
id. This fixes some parse issues in av_channel_layout_from_string().
Signed-off-by: Marton Balint <cus@passwd.hu>
We lacked tests which supposed to fail, and there are some which should fail
but right now it does not. This will be fixed in a later commit.
Signed-off-by: Marton Balint <cus@passwd.hu>
Deduplicates a lot of code.
Some minor differences (mostly white space and inconsistent use of quotes) are
expected in the fate tests, there was no point aiming for exactly the same
formatting.
Signed-off-by: Marton Balint <cus@passwd.hu>
This makes the wav and pcm demuxer demux bigger packets, which is more
efficient.
As a side effect of the bigger packets, audio durations can become less exact
for command lines such as "ffmpeg -i $INPUT -c:a copy -t 1.0 $OUTPUT".
Signed-off-by: Marton Balint <cus@passwd.hu>
- Remove the 1024 cap on the number of samples, for high sample rate audio it
was suboptimal, calculate the low neighbour power of two for the number of
samples (audio blocks) instead.
- Make the function work correctly also for non-pcm codecs by using the stream
bitrate to estimate the target packet size. A previous version of this patch
used av_get_audio_frame_duration2() the estimate the desired packet size, but
for some codecs that returns the duration of a single audio frame regardless
of frame_bytes.
- Fallback to 4096/block_align*block_align if bitrate is not available.
Signed-off-by: Marton Balint <cus@passwd.hu>