Browse Source

modules: packetizer: enforce type

Backportable version of 0463a37586
(without any CORE API change)

Fixes #28972
cherry-pick-c5513cf9
Thomas Guillem 1 year ago
committed by Steve Lhomme
parent
commit
d86797d6b0
  1. 3
      modules/codec/aes3.c
  2. 3
      modules/codec/cvdsub.c
  3. 3
      modules/codec/daala.c
  4. 3
      modules/codec/kate.c
  5. 3
      modules/codec/lpcm.c
  6. 3
      modules/codec/oggspots.c
  7. 3
      modules/codec/rawvideo.c
  8. 3
      modules/codec/speex.c
  9. 3
      modules/codec/spudec/spudec.c
  10. 3
      modules/codec/svcdsub.c
  11. 3
      modules/codec/theora.c
  12. 3
      modules/codec/vorbis.c
  13. 3
      modules/packetizer/a52.c
  14. 3
      modules/packetizer/av1.c
  15. 3
      modules/packetizer/avparser.c
  16. 3
      modules/packetizer/dirac.c
  17. 3
      modules/packetizer/dts.c
  18. 3
      modules/packetizer/flac.c
  19. 3
      modules/packetizer/h264.c
  20. 3
      modules/packetizer/hevc.c
  21. 3
      modules/packetizer/mlp.c
  22. 3
      modules/packetizer/mpeg4audio.c
  23. 3
      modules/packetizer/mpeg4video.c
  24. 3
      modules/packetizer/mpegaudio.c
  25. 3
      modules/packetizer/mpegvideo.c
  26. 3
      modules/packetizer/vc1.c

3
modules/codec/aes3.c

@ -268,6 +268,9 @@ static int Open( decoder_t *p_dec, bool b_packetizer )
{
decoder_sys_t *p_sys;
if( p_dec->fmt_in.i_cat != AUDIO_ES )
return VLC_EGENERIC;
if( p_dec->fmt_in.i_codec != VLC_CODEC_302M )
return VLC_EGENERIC;

3
modules/codec/cvdsub.c

@ -110,6 +110,9 @@ static int DecoderOpen( vlc_object_t *p_this )
decoder_t *p_dec = (decoder_t*)p_this;
decoder_sys_t *p_sys;
if( p_dec->fmt_in.i_cat != SPU_ES )
return VLC_EGENERIC;
if( p_dec->fmt_in.i_codec != VLC_CODEC_CVD )
return VLC_EGENERIC;

3
modules/codec/daala.c

@ -164,6 +164,9 @@ static int OpenDecoder( vlc_object_t *p_this )
decoder_t *p_dec = (decoder_t*)p_this;
decoder_sys_t *p_sys;
if( p_dec->fmt_in.i_cat != VIDEO_ES )
return VLC_EGENERIC;
if( p_dec->fmt_in.i_codec != VLC_CODEC_DAALA )
{
return VLC_EGENERIC;

3
modules/codec/kate.c

@ -339,6 +339,9 @@ static int OpenDecoder( vlc_object_t *p_this )
decoder_t *p_dec = (decoder_t*)p_this;
decoder_sys_t *p_sys;
if( p_dec->fmt_in.i_cat != SPU_ES )
return VLC_EGENERIC;
if( p_dec->fmt_in.i_codec != VLC_CODEC_KATE )
{
return VLC_EGENERIC;

3
modules/codec/lpcm.c

@ -220,6 +220,9 @@ static int OpenCommon( decoder_t *p_dec, bool b_packetizer )
int i_type;
int i_header_size;
if( p_dec->fmt_in.i_cat != AUDIO_ES )
return VLC_EGENERIC;
switch( p_dec->fmt_in.i_codec )
{
/* DVD LPCM */

3
modules/codec/oggspots.c

@ -103,6 +103,9 @@ static int OpenDecoder(vlc_object_t* p_this)
decoder_t* p_dec = (decoder_t*)p_this;
decoder_sys_t* p_sys;
if (p_dec->fmt_in.i_cat != VIDEO_ES)
return VLC_EGENERIC;
if (p_dec->fmt_in.i_codec != VLC_CODEC_OGGSPOTS) {
return VLC_EGENERIC;
}

3
modules/codec/rawvideo.c

@ -78,6 +78,9 @@ vlc_module_end ()
*/
static int OpenCommon( decoder_t *p_dec )
{
if( p_dec->fmt_in.i_cat != VIDEO_ES )
return VLC_EGENERIC;
const vlc_chroma_description_t *dsc =
vlc_fourcc_GetChromaDescription( p_dec->fmt_in.i_codec );
if( dsc == NULL || dsc->plane_count == 0 )

3
modules/codec/speex.c

@ -210,6 +210,9 @@ static int OpenDecoder( vlc_object_t *p_this )
decoder_t *p_dec = (decoder_t*)p_this;
decoder_sys_t *p_sys;
if( p_dec->fmt_in.i_cat != AUDIO_ES )
return VLC_EGENERIC;
if( p_dec->fmt_in.i_codec != VLC_CODEC_SPEEX )
return VLC_EGENERIC;

3
modules/codec/spudec/spudec.c

@ -80,6 +80,9 @@ static int DecoderOpen( vlc_object_t *p_this )
decoder_t *p_dec = (decoder_t*)p_this;
decoder_sys_t *p_sys;
if( p_dec->fmt_in.i_cat != SPU_ES )
return VLC_EGENERIC;
if( p_dec->fmt_in.i_codec != VLC_CODEC_SPU )
return VLC_EGENERIC;

3
modules/codec/svcdsub.c

@ -116,6 +116,9 @@ static int DecoderOpen( vlc_object_t *p_this )
decoder_t *p_dec = (decoder_t*)p_this;
decoder_sys_t *p_sys;
if( p_dec->fmt_in.i_cat != SPU_ES )
return VLC_EGENERIC;
if( p_dec->fmt_in.i_codec != VLC_CODEC_OGT )
return VLC_EGENERIC;

3
modules/codec/theora.c

@ -151,6 +151,9 @@ static int OpenDecoder( vlc_object_t *p_this )
decoder_t *p_dec = (decoder_t*)p_this;
decoder_sys_t *p_sys;
if( p_dec->fmt_in.i_cat != VIDEO_ES )
return VLC_EGENERIC;
if( p_dec->fmt_in.i_codec != VLC_CODEC_THEORA )
{
return VLC_EGENERIC;

3
modules/codec/vorbis.c

@ -235,6 +235,9 @@ static int OpenDecoder( vlc_object_t *p_this )
decoder_t *p_dec = (decoder_t*)p_this;
decoder_sys_t *p_sys;
if( p_dec->fmt_in.i_cat != AUDIO_ES )
return VLC_EGENERIC;
if( p_dec->fmt_in.i_codec != VLC_CODEC_VORBIS )
return VLC_EGENERIC;

3
modules/packetizer/a52.c

@ -324,6 +324,9 @@ static int Open( vlc_object_t *p_this )
decoder_t *p_dec = (decoder_t*)p_this;
decoder_sys_t *p_sys;
if( p_dec->fmt_in.i_cat != AUDIO_ES )
return VLC_EGENERIC;
switch( p_dec->fmt_in.i_codec )
{
case VLC_CODEC_EAC3:

3
modules/packetizer/av1.c

@ -542,6 +542,9 @@ static int Open(vlc_object_t *p_this)
decoder_t *p_dec = (decoder_t*)p_this;
decoder_sys_t *p_sys;
if (p_dec->fmt_in.i_cat != VIDEO_ES)
return VLC_EGENERIC;
if (p_dec->fmt_in.i_codec != VLC_CODEC_AV1)
return VLC_EGENERIC;

3
modules/packetizer/avparser.c

@ -86,6 +86,9 @@ int avparser_OpenPacketizer( vlc_object_t *p_this )
decoder_t *p_dec = (decoder_t*)p_this;
decoder_sys_t *p_sys;
if( p_dec->fmt_in.i_cat != VIDEO_ES )
return VLC_EGENERIC;
/* Restrict to VP9 for now */
if( p_dec->fmt_in.i_codec != VLC_CODEC_VP9 )
return VLC_EGENERIC;

3
modules/packetizer/dirac.c

@ -1370,6 +1370,9 @@ static int Open( vlc_object_t *p_this )
decoder_t *p_dec = (decoder_t*)p_this;
decoder_sys_t *p_sys;
if( p_dec->fmt_in.i_cat != VIDEO_ES )
return VLC_EGENERIC;
if( p_dec->fmt_in.i_codec != VLC_CODEC_DIRAC )
return VLC_EGENERIC;

3
modules/packetizer/dts.c

@ -403,6 +403,9 @@ static int Open( vlc_object_t *p_this )
decoder_t *p_dec = (decoder_t*)p_this;
decoder_sys_t *p_sys;
if( p_dec->fmt_in.i_cat != AUDIO_ES )
return VLC_EGENERIC;
if( p_dec->fmt_in.i_codec != VLC_CODEC_DTS )
return VLC_EGENERIC;

3
modules/packetizer/flac.c

@ -581,6 +581,9 @@ static int Open(vlc_object_t *p_this)
decoder_t *p_dec = (decoder_t*)p_this;
decoder_sys_t *p_sys;
if (p_dec->fmt_in.i_cat != AUDIO_ES)
return VLC_EGENERIC;
if (p_dec->fmt_in.i_codec != VLC_CODEC_FLAC)
return VLC_EGENERIC;

3
modules/packetizer/h264.c

@ -330,6 +330,9 @@ static int Open( vlc_object_t *p_this )
decoder_sys_t *p_sys;
int i;
if( p_dec->fmt_in.i_cat != VIDEO_ES )
return VLC_EGENERIC;
const bool b_avc = (p_dec->fmt_in.i_original_fourcc == VLC_FOURCC( 'a', 'v', 'c', '1' ));
if( p_dec->fmt_in.i_codec != VLC_CODEC_H264 )

3
modules/packetizer/hevc.c

@ -174,6 +174,9 @@ static int Open(vlc_object_t *p_this)
decoder_t *p_dec = (decoder_t*)p_this;
decoder_sys_t *p_sys;
if (p_dec->fmt_in.i_cat != VIDEO_ES)
return VLC_EGENERIC;
if (p_dec->fmt_in.i_codec != VLC_CODEC_HEVC)
return VLC_EGENERIC;

3
modules/packetizer/mlp.c

@ -473,6 +473,9 @@ static int Open( vlc_object_t *p_this )
decoder_t *p_dec = (decoder_t*)p_this;
decoder_sys_t *p_sys;
if( p_dec->fmt_in.i_cat != AUDIO_ES )
return VLC_EGENERIC;
if( p_dec->fmt_in.i_codec != VLC_CODEC_MLP &&
p_dec->fmt_in.i_codec != VLC_CODEC_TRUEHD )
return VLC_EGENERIC;

3
modules/packetizer/mpeg4audio.c

@ -204,6 +204,9 @@ static int OpenPacketizer(vlc_object_t *p_this)
decoder_t *p_dec = (decoder_t*)p_this;
decoder_sys_t *p_sys;
if (p_dec->fmt_in.i_cat != AUDIO_ES)
return VLC_EGENERIC;
if (p_dec->fmt_in.i_codec != VLC_CODEC_MP4A)
return VLC_EGENERIC;

3
modules/packetizer/mpeg4video.c

@ -136,6 +136,9 @@ static int Open( vlc_object_t *p_this )
decoder_t *p_dec = (decoder_t*)p_this;
decoder_sys_t *p_sys;
if( p_dec->fmt_in.i_cat != VIDEO_ES )
return VLC_EGENERIC;
if( p_dec->fmt_in.i_codec != VLC_CODEC_MP4V )
return VLC_EGENERIC;

3
modules/packetizer/mpegaudio.c

@ -615,6 +615,9 @@ static int Open( vlc_object_t *p_this )
decoder_t *p_dec = (decoder_t*)p_this;
decoder_sys_t *p_sys;
if( p_dec->fmt_in.i_cat != AUDIO_ES )
return VLC_EGENERIC;
if(( p_dec->fmt_in.i_codec != VLC_CODEC_MPGA ) &&
( p_dec->fmt_in.i_codec != VLC_CODEC_MP3 ) )
{

3
modules/packetizer/mpegvideo.c

@ -196,6 +196,9 @@ static int Open( vlc_object_t *p_this )
decoder_t *p_dec = (decoder_t*)p_this;
decoder_sys_t *p_sys;
if( p_dec->fmt_in.i_cat != VIDEO_ES )
return VLC_EGENERIC;
if( p_dec->fmt_in.i_codec != VLC_CODEC_MPGV )
return VLC_EGENERIC;

3
modules/packetizer/vc1.c

@ -143,6 +143,9 @@ static int Open( vlc_object_t *p_this )
decoder_t *p_dec = (decoder_t*)p_this;
decoder_sys_t *p_sys;
if( p_dec->fmt_in.i_cat != VIDEO_ES )
return VLC_EGENERIC;
if( p_dec->fmt_in.i_codec != VLC_CODEC_VC1 )
return VLC_EGENERIC;

Loading…
Cancel
Save