Commit 7e9ec875 authored by Steve Lhomme's avatar Steve Lhomme

mkv.cpp: added option "mkv-preload-local-dir", disable when there are broken...

mkv.cpp: added option "mkv-preload-local-dir", disable when there are broken files in the same dir (eMule)
parent 58b693c9
......@@ -402,6 +402,10 @@ vlc_module_begin();
N_("Chapter codecs"),
N_("Use chapter codecs found in the segment."), VLC_TRUE );
add_bool( "mkv-preload-local-dir", 1, NULL,
N_("Preload Directory"),
N_("Preload matroska files from the same family in the same directory (not good for broken files)."), VLC_TRUE );
add_bool( "mkv-seek-percent", 0, NULL,
N_("Seek based on percent not time"),
N_("Seek based on percent not time."), VLC_TRUE );
......@@ -1452,6 +1456,8 @@ static int Open( vlc_object_t * p_this )
p_stream->p_in->setFilePointer( p_segment->cluster->GetElementPosition() );
}
if (config_GetInt( p_demux, "mkv-preload-local-dir" ))
{
/* get the files from the same dir from the same family (based on p_demux->psz_path) */
if (p_demux->psz_path[0] != '\0' && !strcmp(p_demux->psz_access, ""))
{
......@@ -1526,7 +1532,10 @@ static int Open( vlc_object_t * p_this )
}
p_sys->PreloadFamily( *p_segment );
}
p_sys->PreloadLinked( p_segment );
if ( !p_sys->PreparePlayback( NULL ) )
{
msg_Err( p_demux, "cannot use the segment" );
......
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