summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorUoti Urpala <uau@glyph.nonexistent.invalid>2011-01-16 21:16:47 +0200
committerUoti Urpala <uau@glyph.nonexistent.invalid>2011-01-18 14:58:09 +0200
commitd5eaf6a820d73181f07de3387cd1c115a49648f5 (patch)
treeecdac5eacb750224b5998e88d98f66bea39d8b3d
parentb86c9e59228c35c955d6758269755720cef78b50 (diff)
downloadmpv-d5eaf6a820d73181f07de3387cd1c115a49648f5.tar.bz2
mpv-d5eaf6a820d73181f07de3387cd1c115a49648f5.tar.xz
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.
-rw-r--r--mplayer.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/mplayer.c b/mplayer.c
index c09fa7ada9..69e4dcd0fb 100644
--- a/mplayer.c
+++ b/mplayer.c
@@ -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)