Commit a4556602 authored by Jean-Paul Saman's avatar Jean-Paul Saman

davinci: check fmt.i_cat

parent a99f3b3b
...@@ -98,6 +98,8 @@ int OpenAudioDecoder( vlc_object_t *p_this ) ...@@ -98,6 +98,8 @@ int OpenAudioDecoder( vlc_object_t *p_this )
return VLC_EGENERIC; return VLC_EGENERIC;
} }
if( i_cat != AUDIO_ES ) return VLC_EGENERIC;
/* Allocate our private structure */ /* Allocate our private structure */
p_dec->p_sys = p_sys = (decoder_sys_t *)calloc( 1, sizeof( decoder_sys_t ) ); p_dec->p_sys = p_sys = (decoder_sys_t *)calloc( 1, sizeof( decoder_sys_t ) );
if( !p_dec->p_sys ) if( !p_dec->p_sys )
......
...@@ -78,6 +78,8 @@ int OpenVideoDecoder( vlc_object_t *p_this ) ...@@ -78,6 +78,8 @@ int OpenVideoDecoder( vlc_object_t *p_this )
&psz_codec, &psz_namecodec ) ) &psz_codec, &psz_namecodec ) )
return VLC_EGENERIC; return VLC_EGENERIC;
if( i_cat != VIDEO_ES ) return VLC_EGENERIC;
msg_Dbg( p_dec, "found davinci decoder %s for %s (codec=%4.4s, cat=%s)", msg_Dbg( p_dec, "found davinci decoder %s for %s (codec=%4.4s, cat=%s)",
psz_codec, (char*)&p_dec->fmt_out.i_codec, psz_namecodec, psz_codec, (char*)&p_dec->fmt_out.i_codec, psz_namecodec,
(i_cat == VIDEO_ES) ? "video" : (i_cat == VIDEO_ES) ? "video" :
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment