0
0
mirror of https://github.com/mpv-player/mpv.git synced 2024-09-20 03:52:22 +02:00

Fixes unsafe 'angle' command with get_property() call.

Without it, MPlayer segv trying to dereference NULL demuxer.
Patch by Mathieu Schroeter (mathieu dot schroeter at gamesover dot ch)



git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27412 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
ben 2008-08-04 13:33:22 +00:00
parent 291a150e81
commit 149cab0b04

View File

@ -450,10 +450,11 @@ static int mp_property_chapter(m_option_t *prop, int action, void *arg,
static int mp_property_angle(m_option_t *prop, int action, void *arg,
MPContext *mpctx)
{
int angle;
int angle = -1;
int angles;
char *angle_name = NULL;
if (mpctx->demuxer)
angle = demuxer_get_current_angle(mpctx->demuxer);
if (angle < 0)
return M_PROPERTY_UNAVAILABLE;