The PCM path decoded and pushed samples into joc_core without any
backpressure. The kernel's rendered-output queue is bounded, but its
input queue is not, so a large part of the track could pile up and
joc_stream_flush() at EOF rendered all of it in one call, causing the
stall near the end of playback.
Keep at most 96000 samples (2 seconds at 48 kHz) between the samples
pushed into the renderer and the samples already handed to mpv. When
that limit is reached, drain output and wait instead of decoding another
packet. The flush at EOF then only has a short queue to process.
Also clear eof_pending/eof_frame and the PCM decoder's in-flight
frame/packet in ad_joc_reset(). Near the end of a track the demuxer may
already have delivered EOF; seeking back left the stale EOF state in
place, and the next process call wrote EOF immediately, closing the
track.
E-AC-3 JOC and the ad-joc-pcm=no path are unchanged.