Commit ef790e37 authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf

Do not treat RMF files named .ram as playlists

Close #6451
parent 47a9b990
...@@ -76,11 +76,20 @@ static void ParseClipInfo( const char * psz_clipinfo, char **ppsz_artist, char * ...@@ -76,11 +76,20 @@ static void ParseClipInfo( const char * psz_clipinfo, char **ppsz_artist, char *
int Import_RAM( vlc_object_t *p_this ) int Import_RAM( vlc_object_t *p_this )
{ {
demux_t *p_demux = (demux_t *)p_this; demux_t *p_demux = (demux_t *)p_this;
const uint8_t *p_peek;
if(! demux_IsPathExtension( p_demux, ".ram" ) || if(! demux_IsPathExtension( p_demux, ".ram" ) ||
demux_IsPathExtension( p_demux, ".rm" ) ) demux_IsPathExtension( p_demux, ".rm" ) )
return VLC_EGENERIC; return VLC_EGENERIC;
/* Many Real Media Files are misdetected */
if( stream_Peek( p_demux->s, &p_peek, 4 ) < 4 )
return VLC_EGENERIC;
if( !memcmp( p_peek, ".ra", 3 ) || !memcmp( p_peek, ".RMF", 4 ) )
{
return VLC_EGENERIC;
}
STANDARD_DEMUX_INIT_MSG( "found valid RAM playlist" ); STANDARD_DEMUX_INIT_MSG( "found valid RAM playlist" );
p_demux->p_sys->psz_prefix = FindPrefix( p_demux ); p_demux->p_sys->psz_prefix = FindPrefix( p_demux );
......
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