mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-12 19:18:44 +02:00
be8a4f80b9
During a resampling operation where 1) user has specified first_pts 2) SWR_FLAG_RESAMPLE is not set initially (directly or otherwise) 3) first_pts has been fulfilled (always using hard compensation) then upon first encountering a delay where a soft compensation is required, swr_set_compensation will lead to another init of swr which will reset outpts to the specified firstpts thus leading to an output frame having its pts = firstpts. When the next input frame is received, swr will see a large delay and inject silence from firstpts to the current frame's pts. This can lead to severe desync and in worst case, loss of audio playback. Parameter firstpts initialized to AV_NOPTS_VALUE in swr_alloc and then checked in swr_init to avoid resetting outpts, thus avoiding reapplication of firstpts. Fixes #4131.
25 lines
1.2 KiB
Plaintext
25 lines
1.2 KiB
Plaintext
#tb 0: 1/1000
|
|
#media_type 0: audio
|
|
#codec_id 0: pcm_s16le
|
|
#sample_rate 0: 1000
|
|
#channel_layout_name 0: mono
|
|
0, 0, 0, 132, 264, 0xc2981f45
|
|
0, 132, 132, 68, 136, 0xe78e468d
|
|
0, 200, 200, 100, 200, 0xd55c67d0
|
|
0, 300, 300, 100, 200, 0xd55c67d0
|
|
0, 400, 400, 100, 200, 0xd55c67d0
|
|
0, 500, 500, 93, 186, 0x85ca5db4
|
|
0, 593, 593, 110, 220, 0xa2655d0b
|
|
0, 703, 703, 108, 216, 0x95cb6f01
|
|
0, 811, 811, 108, 216, 0xf35668b8
|
|
0, 919, 919, 149, 298, 0xc273245f
|
|
0, 1068, 1068, 136, 272, 0xedeb6e0a
|
|
0, 1204, 1204, 98, 196, 0xea18668e
|
|
0, 1302, 1302, 98, 196, 0x412861e7
|
|
0, 1400, 1400, 98, 196, 0x7ec361b2
|
|
0, 1498, 1498, 110, 220, 0xf3ae6a6a
|
|
0, 1608, 1608, 108, 216, 0xab2f6c93
|
|
0, 1716, 1716, 107, 214, 0x50de6eb9
|
|
0, 1823, 1823, 106, 212, 0x67b8656d
|
|
0, 1929, 1929, 18, 36, 0x2b7911c6
|