diff options
Diffstat (limited to 'video/out/vo_lavc.c')
-rw-r--r-- | video/out/vo_lavc.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/video/out/vo_lavc.c b/video/out/vo_lavc.c index 2f48e3f750..e817b530e0 100644 --- a/video/out/vo_lavc.c +++ b/video/out/vo_lavc.c @@ -60,6 +60,13 @@ static void uninit(struct vo *vo) encoder_encode(enc, NULL); // finish encoding } +static void on_ready(void *ptr) +{ + struct vo *vo = ptr; + + vo_event(vo, VO_EVENT_INITIAL_UNBLOCK); +} + static int reconfig2(struct vo *vo, struct mp_image *img) { struct priv *vc = vo->priv; @@ -127,7 +134,7 @@ static int reconfig2(struct vo *vo, struct mp_image *img) encoder->time_base = av_inv_q(tb); - if (!encoder_init_codec_and_muxer(vc->enc)) + if (!encoder_init_codec_and_muxer(vc->enc, on_ready, vo)) goto error; return 0; @@ -233,6 +240,7 @@ const struct vo_driver video_out_lavc = { .encode = true, .description = "video encoding using libavcodec", .name = "lavc", + .initially_blocked = true, .untimed = true, .priv_size = sizeof(struct priv), .preinit = preinit, |