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>