FFmpeg: Fix race in sending new frames
If the destination had stopped accepting frames after readyToSend* was
emitted, sendMediaFrame() rejected a frame even though the source was
told it could push. This can happen for example when encoder
initialization moves previously buffered frames into the encoding queue
after possible duplication from frame rate adapting.
Restructure frame queues in encoder so that adapted frames are not taken
into account in the queue size limit. When frames are processed, they
are adapted one at a time by the frame rate adapter until it has frames
to pass to the encoder queue. This way the input queue cannot
spontaneously expand and reject new frames.
New limit is 9 input frames instead of 10, as the encoder queue is 1
frame or more.
Fixes: QTBUG-149942
Pick-to: 6.12
Change-Id: I554cede495f6ba603f8ec7018aa7af5e8879b954
Reviewed-by: Artem Dyomin <artem.dyomin@qt.io>