FFmpeg: Fix hang recording variable-frame-size audio codecs


setupStreamParameters() unconditionally set frame_size to 1024,
even for codecs like PCM that support variable frame sizes and
otherwise leave it at 0. FFmpeg 9 dropped the AV_CODEC_CAP_VARIABLE_
FRAME_SIZE exemption in its frame-size check, so encode_send_frame()
now rejects any frame whose nb_samples exceeds a non-zero frame_size
for such codecs. This caused every frame to be dropped and recording
to never complete, hanging until the test's wait timeout.

Only force frame_size for codecs that actually require a fixed one;
fixed-frame-size codecs set their own correct value during
avcodec_open2() regardless.

Pick-to: 6.12 6.11 6.8
Change-Id: I7bacf89b0d017e2fdb9b29252c1fc8e51b392205
Reviewed-by: Artem Dyomin <artem.dyomin@qt.io>
Reviewed-by: Mikko Hallamaa <mikko.hallamaa@qt.io>
commitc8c034dbf08f00805491de1e76d77952eb31b0cb
parent99ca3163ac39a55fd601891b3405b8b38288150b
authorTim Blechmann <tim.blechmann@qt.io>
committerTim Blechmann <tim.blechmann@qt.io>
commit timeThu, 6 Aug 2026 14:03:44 +0000