path: root/player/video.c
diff options
authorwm4 <wm4@nowhere>2018-04-22 19:40:36 +0200
committerJan Ekström <>2018-04-29 02:21:32 +0300
commit6c8362ef54f4e90476553cb6b64996cc414da06d (patch)
treeab3fa75a18958bacc08c473304f59519a58f5969 /player/video.c
parent8135e25600ace2894df274e6a825cfef525fee77 (diff)
encode: rewrite half of it
The main change is that we wait with opening the muxer ("writing headers") until we have data from all streams. This fixes race conditions at init due to broken assumptions in the old code. This also changes a lot of other stuff. I found and fixed a few API violations (often things for which better mechanisms were invented, and the old ones are not valid anymore). I try to get away from the public mutex and shared fields in encode_lavc_context. For now it's still needed for some timestamp-related fields, but most are gone. It also removes some bad code duplication between audio and video paths.
Diffstat (limited to 'player/video.c')
1 files changed, 0 insertions, 7 deletions
diff --git a/player/video.c b/player/video.c
index 1a85cf511f..f4623f29e8 100644
--- a/player/video.c
+++ b/player/video.c
@@ -263,13 +263,6 @@ void reinit_video_chain_src(struct MPContext *mpctx, struct track *track)
mp_pin_connect(vo_c->filter->f->pins[0], vo_c->dec_src);
- if (mpctx->encode_lavc_ctx) {
- encode_lavc_set_video_fps(mpctx->encode_lavc_ctx,
- vo_c->filter->container_fps);
- }
if (!recreate_video_filters(mpctx))
goto err_out;