Resume native PCM draining after input EOF
process_pcm saved the EOF frame and enabled draining, then returned without emitting output or marking filter progress. Reading the input pin does not schedule another process call, so the queued PCM was left stranded with the output request still pending. On Android this stalled the 10-second WAV at 00:06 and the full FLAC at 04:38 / 05:05. Mark filter progress after storing EOF so the next process call runs the existing gradual drain and forwards EOF after the remaining audio. Keep the input-duration limit, renderer flush and decoder routing intact. Verified with native Windows builds: the WAV outputs 480000 samples and the FLAC outputs 14647040 samples at 48 kHz, both reaching EOF. The FLAC baseline stalls at 278.528 seconds. E-AC-3 JOC output is bit-identical, and ad-joc-pcm=no still selects the default decoder. Android baseline failures were reproduced; the patched APK has not been built or tested.
This commit is contained in:
1 parent
23a94a60fa
commit
ad9419fa7d
1 file changed
+3
@@ -625,6 +625,9 @@ static void process_pcm(struct mp_filter *f)
|
|||||||
}
|
}
|
||||||
p->eof_frame = in;
|
p->eof_frame = in;
|
||||||
p->eof_pending = true;
|
p->eof_pending = true;
|
||||||
|
/* Reading EOF does not schedule us again. No further input will
|
||||||
|
* arrive, so explicitly resume the drain with output still requested. */
|
||||||
|
mp_filter_internal_mark_progress(f);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (in.type != MP_FRAME_PACKET) {
|
if (in.type != MP_FRAME_PACKET) {
|
||||||
|
|||||||
Reference in new issue
Block a user