Skip to content
Snippets Groups Projects
Commit dfb2c624 authored by François Cartegnie's avatar François Cartegnie :fingers_crossed: Committed by Marvin Scholz
Browse files

es_out: fix flapping PREROLL flag on non dated packets


Saves pts to perform preroll target comparison against.
refs #25129

In some cases, the packets are sent interleaved with non dated packets
SEND 1
SEND TS_INVALID
(...) multiple times, simplified to 1 occurence
PCR 1
SEND 719996
SEND TS_INVALID
PCR 719996
SEND 1439992
SEND TS_INVALID
PCR 1439992
SEND 2160008
SEND TS_INVALID
PCR 2160008

Until preroll_end (file caching) is reached, all packets
are flagged as PREROLL.

Entering preroll has effect on audio output by flushing
previous content, and silencing dropped buffers.

Due to non dated interleaving, the stateless es_out keeps
flipping PREROLL packets and triggering the in-stream PREROLL
behaviour (like SET_NEXT_DISPLAY_TIME).
The effect being (here with alsa) to re-enter preroll each
time, extending decoder preroll until pts >= preroll_end
and flushing decoders.

Stream buffering done (1439 ms in 0 ms)
ModuleThread_PlayAudio pts 1 preroll end -9223372036854775808
inserting 3840 zeroes / 80 ms
cannot write samples: Relais brisé (pipe)
ModuleThread_PlayAudio pts 120001 preroll end 9223372036854775807
(...)
ModuleThread_PlayAudio pts 719996 preroll end 719996
end of audio preroll
inserting 34804 zeroes / 725 ms 719996
ModuleThread_PlayAudio pts 839996 preroll end 9223372036854775807
(...)
ModuleThread_PlayAudio pts 1439992 preroll end 1439992
end of audio preroll
inserting 69172 zeroes / 1441 ms 1439992
ModuleThread_PlayAudio pts 1559992 preroll end 9223372036854775807
(...)
ModuleThread_PlayAudio pts 2160008 preroll end 2160008
end of audio preroll
inserting 103601 zeroes / 2158 ms 2160008
ModuleThread_PlayAudio pts 2280008 preroll end -9223372036854775808
(...)

(manual backport from commit b752ffe1)
Signed-off-by: default avatarMarvin Scholz <epirat07@gmail.com>
parent 493b7a03
No related branches found
No related tags found
Loading
Pipeline #157542 passed with stages
in 17 minutes and 20 seconds
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment