diff options
Diffstat (limited to 'player/audio.c')
-rw-r--r-- | player/audio.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/player/audio.c b/player/audio.c index 25d7baa6af..4c1ba90d35 100644 --- a/player/audio.c +++ b/player/audio.c @@ -389,9 +389,6 @@ static void reinit_audio_filters_and_output(struct MPContext *mpctx) struct track *track = ao_c->track; struct af_stream *afs = ao_c->af; - if (ao_c->input_frame) - mp_aframe_config_copy(ao_c->input_format, ao_c->input_frame); - if (!mp_aframe_config_is_valid(ao_c->input_format)) { // We don't know the audio format yet - so configure it later as we're // resyncing. fill_audio_buffers() will call this function again. @@ -843,6 +840,9 @@ static int decode_new_frame(struct ao_chain *ao_c) res = audio_get_frame(ao_c->audio_src, &ao_c->input_frame); } + if (ao_c->input_frame) + mp_aframe_config_copy(ao_c->input_format, ao_c->input_frame); + switch (res) { case DATA_OK: return AD_OK; case DATA_WAIT: return AD_WAIT; |