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>
commit5d851de4a70b662b5646e3e752315e31b25009de
parentc57051fcb5140cebea4683e83aa984d48792e209
authorMikko Hallamaa <mikko.hallamaa@qt.io>
committerMikko Hallamaa <mikko.hallamaa@qt.io>
commit timeThu, 10 Sep 2026 08:49:41 +0000