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

Do not treat RMF files named .ram as playlists

Close #6451
(cherry picked from commit ef790e3727fbec13e8a7fd09122581e2ae92b6b5)
Signed-off-by: default avatarJean-Baptiste Kempf <jb@videolan.org>
parent 22db9f28
......@@ -76,11 +76,20 @@ static void ParseClipInfo( const char * psz_clipinfo, char **ppsz_artist, char *
int Import_RAM( vlc_object_t *p_this )
{
demux_t *p_demux = (demux_t *)p_this;
const uint8_t *p_peek;
if(! demux_IsPathExtension( p_demux, ".ram" ) ||
demux_IsPathExtension( p_demux, ".rm" ) )
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" );
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