Skip to content

es_out: rework ES_OUT_GET_EMPTY (Drain !) and fix dvdnav

Thomas Guillem requested to merge tguillem/vlc:es-out-empty into master

There were some corner cases where dvdnav could call ES_OUT_GET_EMPTY without calling RESET_PCR after. This is UB (from the documentation) and can lead to unrecoverable audio errors (underrun).

All users of ES_OUT_GET_EMPTY (except the core) expect to stop the buffering and drain the es_out, so rename this function and actually drain all decoders.

It is now possible to drain the es_out from any demuxers modules. The call is non-blocking, and the drained state should be polled via ES_OUT_IS_EMPTY (that is only checking the state without any modification). Note that drained callbacks from es_out to demuxers/input is out of scope for VLC 4.0.

Merge request reports

Loading