FFmpeg: Allow 0 frame rate for variable-rate streams


Variable rate streams used a hardcoded 30fps default for codec
negotiation, time base, and pts advancement. However, a variable-rate
stream's frame rate can legitimately be 0 as long as time base and pts
stay valid, but some codecs still need a concrete non-zero frame rate
(e.g. Windows Media Foundation encoders).

This patch keeps the frame rate at 0 for negotiation when the stream
is variable rate and no fixed rate is requested, while still using a
30fps default for time base, pts advancement, bitrate estimation, and
for AVCodecContext::framerate specifically.

Added unit tests for adjustFrameRate() and adjustFrameTimeBase().

As a drive-by, fix some include formatting.

Pick-to: 6.12
Change-Id: I85834a8274b7b707cb8fbce7b336033c6bcdb560
Reviewed-by: Artem Dyomin <artem.dyomin@qt.io>
commitadacaf87390cf3614cb59096f478c91e97464999
parent524c9c6650ac2fed8f6a2486e7fc7dc5fc92c3fd
authorMikko Hallamaa <mikko.hallamaa@qt.io>
committerMikko Hallamaa <mikko.hallamaa@qt.io>
commit timeWed, 2 Sep 2026 07:55:15 +0000