summaryrefslogtreecommitdiffstats
path: root/audio/out/ao_lavc.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2020-03-22 21:08:44 +0100
committerwm4 <wm4@nowhere>2020-03-22 21:08:44 +0100
commit6169fba79679aff0c4b07fbae03ed30e9f6f7eb6 (patch)
tree8a20ff452679a00ca900f182a260c5acb549ce63 /audio/out/ao_lavc.c
parent37f441d61b1e2f92a31fe8f71dc965254d8e0d95 (diff)
downloadmpv-6169fba79679aff0c4b07fbae03ed30e9f6f7eb6.tar.bz2
mpv-6169fba79679aff0c4b07fbae03ed30e9f6f7eb6.tar.xz
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.
Diffstat (limited to 'audio/out/ao_lavc.c')
-rw-r--r--audio/out/ao_lavc.c1
1 files changed, 0 insertions, 1 deletions
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,