diff options
Diffstat (limited to 'player')
-rw-r--r-- | player/audio.c | 6 | ||||
-rw-r--r-- | player/video.c | 1 |
2 files changed, 7 insertions, 0 deletions
diff --git a/player/audio.c b/player/audio.c index ce9e1cd06b..9b1340ec96 100644 --- a/player/audio.c +++ b/player/audio.c @@ -790,6 +790,10 @@ void fill_audio_out_buffers(struct MPContext *mpctx) if (mpctx->ao && ao_query_and_reset_events(mpctx->ao, AO_EVENT_RELOAD)) reload_audio_output(mpctx); + if (mpctx->ao && ao_query_and_reset_events(mpctx->ao, + AO_EVENT_INITIAL_UNBLOCK)) + ao_unblock(mpctx->ao); + struct ao_chain *ao_c = mpctx->ao_chain; if (!ao_c) return; @@ -811,6 +815,7 @@ void fill_audio_out_buffers(struct MPContext *mpctx) mpctx->audio_status = STATUS_EOF; MP_VERBOSE(mpctx, "audio EOF without any data\n"); mp_filter_reset(ao_c->filter->f); + encode_lavc_stream_eof(mpctx->encode_lavc_ctx, STREAM_AUDIO); } return; // try again next iteration } @@ -994,6 +999,7 @@ void fill_audio_out_buffers(struct MPContext *mpctx) if (!was_eof) { MP_VERBOSE(mpctx, "audio EOF reached\n"); mp_wakeup_core(mpctx); + encode_lavc_stream_eof(mpctx->encode_lavc_ctx, STREAM_AUDIO); } } } diff --git a/player/video.c b/player/video.c index 693454ecb0..17dff84984 100644 --- a/player/video.c +++ b/player/video.c @@ -1027,6 +1027,7 @@ void write_video(struct MPContext *mpctx) if (mpctx->time_frame <= 0) { MP_VERBOSE(mpctx, "video EOF reached\n"); mpctx->video_status = STATUS_EOF; + encode_lavc_stream_eof(mpctx->encode_lavc_ctx, STREAM_VIDEO); } } |