path: root/player/video.c
diff options
authorwm4 <wm4@nowhere>2018-04-29 19:42:18 +0200
committerJan Ekström <>2018-05-03 01:08:44 +0300
commit0ab3184526e7b9b95c06a3ec7a6674283a5922d0 (patch)
tree4c05b192e65b51c68f3024b4b7946dcb79caf404 /player/video.c
parent958053ff56109a38e9f8e0a0aa8786a5f47adb7c (diff)
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.
Diffstat (limited to 'player/video.c')
1 files changed, 1 insertions, 0 deletions
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);