1
0
mirror of https://github.com/mpv-player/mpv synced 2025-03-25 04:38:01 +00:00

core: ordered chapters: fix bad subtitle parameter

mp_property_do() takes the value to set a property to through a
pointer. The calling code used '&mpctx->global_sub_pos' as the
pointer; however that variable could be changed during the
mp_property_do() call. Use a pointer to a copy of the original value
instead.

I think this only caused problems if you switched subtitle tracks from
a real one to "disabled" and then switched to a timeline part from
another source.
This commit is contained in:
Uoti Urpala 2011-01-16 21:16:47 +02:00
parent b86c9e5922
commit d5eaf6a820

View File

@ -2963,7 +2963,7 @@ static void reinit_decoders(struct MPContext *mpctx)
{
reinit_video_chain(mpctx);
reinit_audio_chain(mpctx);
mp_property_do("sub", M_PROPERTY_SET, &mpctx->global_sub_pos, mpctx);
mp_property_do("sub", M_PROPERTY_SET, &(int){mpctx->global_sub_pos}, mpctx);
}
static void seek_reset(struct MPContext *mpctx)