From 0ab3184526e7b9b95c06a3ec7a6674283a5922d0 Mon Sep 17 00:00:00 2001 From: wm4 Date: Sun, 29 Apr 2018 19:42:18 +0200 Subject: encode: get rid of the output packet queue Until recently, ao_lavc and vo_lavc started encoding whenever the core happened to send them data. Since audio and video are not initialized at the same time, and the muxer was not necessarily opened when the first encoder started to produce data, the resulting packets were put into a queue. As soon as the muxer was opened, the queue was flushed. Change this to make the core wait with sending data until all encoders are initialized. This has the advantage that we don't need to queue up the packets. --- player/video.c | 1 + 1 file changed, 1 insertion(+) (limited to 'player/video.c') 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); } } -- cgit v1.2.3