Commit 9f2c7b28 authored by Laurent Aimar's avatar Laurent Aimar Committed by Jean-Baptiste Kempf

Reworked the way avformat input are blacklisted.

(cherry picked from commit 0ddd6effdc4668eff50d178c8976de4417e17206)
Signed-off-by: default avatarJean-Baptiste Kempf <jb@videolan.org>
parent db9be765
......@@ -139,19 +139,25 @@ int OpenDemux( vlc_object_t *p_this )
return VLC_EGENERIC;
}
/* Don't try to handle MPEG unless forced */
if( !p_demux->b_force &&
( !strcmp( fmt->name, "mpeg" ) ||
!strcmp( fmt->name, "vcd" ) ||
!strcmp( fmt->name, "vob" ) ||
!strcmp( fmt->name, "mpegts" ) ||
if( !p_demux->b_force )
{
static const char ppsz_blacklist[][16] = {
/* Don't handle MPEG unless forced */
"mpeg", "vcd", "vob", "mpegts",
/* libavformat's redirector won't work */
!strcmp( fmt->name, "redir" ) ||
!strcmp( fmt->name, "sdp" ) ) )
"redir", "sdp",
""
};
for( int i = 0; *ppsz_blacklist[i]; i++ )
{
if( !strcmp( fmt->name, ppsz_blacklist[i] ) )
{
free( psz_url );
return VLC_EGENERIC;
}
}
}
/* Don't trigger false alarms on bin files */
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