input: decoder: fix potential NULL deref on transcoding
authorFrancois Cartegnie <fcvlcdev@free.fr>
Tue, 12 Feb 2019 17:49:28 +0000 (18:49 +0100)
committerFrancois Cartegnie <fcvlcdev@free.fr>
Tue, 12 Feb 2019 17:50:16 +0000 (18:50 +0100)
946b67f964396056caba8cb3b62bdf9a976abfae regression

src/input/decoder.c

index 855b4cc..51b509d 100644 (file)
@@ -1912,7 +1912,7 @@ static decoder_t * CreateDecoder( vlc_object_t *p_parent,
     switch( fmt->i_cat )
     {
         case VIDEO_ES:
-            if( !input_priv( p_input )->b_thumbnailing )
+            if( !p_input || !input_priv( p_input )->b_thumbnailing )
                 p_dec->cbs = &dec_video_cbs;
             else
                 p_dec->cbs = &dec_thumbnailer_cbs;