* src/input/input_dec.c: fixed DVB subtitles support in old MPEG TS demuxer.
authorGildas Bazin <gbazin@videolan.org>
Thu, 6 May 2004 17:35:26 +0000 (17:35 +0000)
committerGildas Bazin <gbazin@videolan.org>
Thu, 6 May 2004 17:35:26 +0000 (17:35 +0000)
src/input/input_dec.c

index e4998c9..98647b2 100644 (file)
@@ -443,10 +443,10 @@ static decoder_t * CreateDecoder( input_thread_t * p_input,
             memcpy( p_dec->fmt_in.subs.spu.palette,
                     p_es->p_demux_data, 17 * 4 );
         }
-        else if( p_es->i_fourcc == VLC_FOURCC( 'd', 'v', 'b', 's' ) )
+        else if( p_es->i_fourcc == VLC_FOURCC( 'd', 'v', 'b', 's' ) &&
+                 p_es->p_spuinfo )
         {
-            dvb_spuinfo_t *p_dvbs = (dvb_spuinfo_t*)p_es->p_demux_data;
-
+            dvb_spuinfo_t *p_dvbs = (dvb_spuinfo_t*)p_es->p_spuinfo;
             p_dec->fmt_in.subs.dvb.i_id = p_dvbs->i_id;
         }
     }