mpv/mpv-0.15.0_fix_NULL_ptr.patch

14 lines
546 B
Diff

Index: mpv-0.15.0/player/command.c
===================================================================
--- mpv-0.15.0.orig/player/command.c
+++ mpv-0.15.0/player/command.c
@@ -2438,7 +2438,7 @@ static int mp_property_video_codec(void
{
MPContext *mpctx = ctx;
struct track *track = mpctx->current_track[0][STREAM_VIDEO];
- const char *c = track->d_video ? track->d_video->decoder_desc : NULL;
+ const char *c = track && track->d_video ? track->d_video->decoder_desc : NULL;
return m_property_strdup_ro(action, arg, c);
}