[MPlayer-dev-eng] [PATCH] mplayer.c: fix crashes for reinit_video_chain failures.

Reimar Döffinger Reimar.Doeffinger at gmx.de
Mon Jan 18 01:22:30 EET 2021


The error path should undo the reset, it should not
set things that the demuxer owns to NULL.
In particular, the rawdv demuxer would crash if
opening the vo failed.
Fixes trac issue #2326.
---
 mplayer.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mplayer.c b/mplayer.c
index f335299a6..5b933f7fd 100644
--- a/mplayer.c
+++ b/mplayer.c
@@ -2434,7 +2434,7 @@ int reinit_video_chain(void)
     return 1;

 err_out:
-    mpctx->sh_video = mpctx->d_video->sh = NULL;
+    mpctx->sh_video = mpctx->sh_video->ds = NULL;
     return 0;
 }

--
2.30.0



More information about the MPlayer-dev-eng mailing list