From 6169fba79679aff0c4b07fbae03ed30e9f6f7eb6 Mon Sep 17 00:00:00 2001 From: wm4 Date: Sun, 22 Mar 2020 21:08:44 +0100 Subject: encode: fix occasional init crash due to initialization order issues Looks like the recent change to this actually made it crash whenever audio happened to be initialized first, due to not setting the mux_stream field before the on_ready callback. Mess a way around this. Also remove a stray unused variable from ao_lavc.c. --- audio/out/ao_lavc.c | 1 - 1 file changed, 1 deletion(-) (limited to 'audio/out/ao_lavc.c') diff --git a/audio/out/ao_lavc.c b/audio/out/ao_lavc.c index e4700d7f1b..a38c01e0b2 100644 --- a/audio/out/ao_lavc.c +++ b/audio/out/ao_lavc.c @@ -232,7 +232,6 @@ static void encode(struct ao *ao, double apts, void **data) // whatever the fuck this code does? MP_WARN(ao, "audio frame pts went backwards (%d <- %d), autofixed\n", (int)frame->pts, (int)ac->lastpts); - int64_t prets = frame->pts; frame_pts = ac->lastpts + 1; ac->lastpts = frame_pts; frame->pts = av_rescale_q(frame_pts, ac->worst_time_base, -- cgit v1.2.3