FFmpeg: Toggle timebase adjustment on pause
Timebase adjustment for next frame was toggled when a frame was added to
encoder while paused. However, if no frames were added during a pause,
and frames continued after resuming, the timebase toggle would've been
skipped causing video duration to include the pause.
Toggle the timebase adjustment when pausing to not require new frames
during a pause to fix timestamps.
Add a test that checks frames are dropped in encoding while paused, and
that the paused gap is skipped.
Pick-to: 6.12
Fixes: QTBUG-150044
Change-Id: I8f21e364b35c170db75b4fc14668bc5d1da10b85
Reviewed-by: Artem Dyomin <artem.dyomin@qt.io>