Commit 0ddd6eff authored by Laurent Aimar's avatar Laurent Aimar

Reworked the way avformat input are blacklisted.

parent 04f7cf0a
...@@ -139,19 +139,25 @@ int OpenDemux( vlc_object_t *p_this ) ...@@ -139,19 +139,25 @@ int OpenDemux( vlc_object_t *p_this )
return VLC_EGENERIC; return VLC_EGENERIC;
} }
/* Don't try to handle MPEG unless forced */ if( !p_demux->b_force )
if( !p_demux->b_force && {
( !strcmp( fmt->name, "mpeg" ) || static const char ppsz_blacklist[][16] = {
!strcmp( fmt->name, "vcd" ) || /* Don't handle MPEG unless forced */
!strcmp( fmt->name, "vob" ) || "mpeg", "vcd", "vob", "mpegts",
!strcmp( fmt->name, "mpegts" ) ||
/* libavformat's redirector won't work */ /* libavformat's redirector won't work */
!strcmp( fmt->name, "redir" ) || "redir", "sdp",
!strcmp( fmt->name, "sdp" ) ) ) ""
};
for( int i = 0; *ppsz_blacklist[i]; i++ )
{
if( !strcmp( fmt->name, ppsz_blacklist[i] ) )
{ {
free( psz_url ); free( psz_url );
return VLC_EGENERIC; return VLC_EGENERIC;
} }
}
}
/* Don't trigger false alarms on bin files */ /* Don't trigger false alarms on bin files */
if( !p_demux->b_force && !strcmp( fmt->name, "psxstr" ) ) if( !p_demux->b_force && !strcmp( fmt->name, "psxstr" ) )
......
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