audio: fix EOF handling if there was no data at all

It stopped and did nothing, instead of terminating (or just letting
video play, if there was any video). Regression due to recent filter
changes.
This commit is contained in:
wm4 2018-04-19 19:16:01 +02:00
parent ff24285eb1
commit f4351e6f7d
1 changed files with 7 additions and 0 deletions

View File

@ -805,6 +805,13 @@ void fill_audio_out_buffers(struct MPContext *mpctx)
// Probe the initial audio format.
mp_pin_out_request_data(ao_c->filter->f->pins[1]);
reinit_audio_filters_and_output(mpctx);
if (ao_c->filter->got_output_eof &&
mpctx->audio_status != STATUS_EOF)
{
mpctx->audio_status = STATUS_EOF;
MP_VERBOSE(mpctx, "audio EOF without any data\n");
mp_filter_reset(ao_c->filter->f);
}
return; // try again next iteration
}