[vlc-devel] [PATCH] taglib: Enable prefetch & caching on the IOStream
Hugo Beauzée-Luyssen
hugo at beauzee.fr
Mon Oct 28 11:56:41 CET 2019
On Mon, Oct 28, 2019, at 10:33 AM, Thomas Guillem wrote:
> Hello,
>
> On Mon, Oct 28, 2019, at 10:29, Hugo Beauzée-Luyssen wrote:
> > We can't use vlc_stream_NewURL as it will include the skiptags filter
> > ---
> > modules/meta_engine/taglib.cpp | 6 ++++++
> > 1 file changed, 6 insertions(+)
> >
> > diff --git a/modules/meta_engine/taglib.cpp b/modules/meta_engine/taglib.cpp
> > index c71a66ca58..5abc7d0ca6 100644
> > --- a/modules/meta_engine/taglib.cpp
> > +++ b/modules/meta_engine/taglib.cpp
> > @@ -842,6 +842,12 @@ static int ReadMeta( vlc_object_t* p_this)
> > free( psz_uri );
> > if( p_stream == NULL )
> > return VLC_EGENERIC;
> > + stream_t* p_filter = vlc_stream_FilterNew( p_stream, "prefetch" );
> > + if( p_filter )
> > + p_stream = p_filter;
> > + p_filter = vlc_stream_FilterNew( p_stream, "cache" );
> > + if( p_filter )
> > + p_stream = p_filter;
>
> You are adding 2 filters here when you only need one of them. Is this
> intentional ?
>
> cf. stream_FilterChainNew() implementation.
>
> >
> > VlcIostream s( p_stream );
> > f = FileRef( &s );
Hi,
Hm, yeah it seems I misunderstood what stream_FilterChainNew was doing, my bad
Regards,
--
Hugo Beauzée-Luyssen
hugo at beauzee.fr
More information about the vlc-devel
mailing list