taglib reads unlimited if no IDv3 or MPEG header is found at the
beginning.
(cherry picked from commit
8ec8b0d2add84b6d6b0c043e1c4f241998915ecd) (rebased)
rebased:
- only used with Taglib 1.11+ which is not always the case with 3.0
Gbp-Pq: Name 0041-meta_engine-taglib-restrict-unlimited-reads-on-strea.patch
p_stream = p_filter;
VlcIostream s( p_stream );
- f = FileRef( &s );
+#ifndef VLC_PATCHED_TAGLIB_ID3V2_READSTYLE
+ uint64_t dummy;
+ if( vlc_stream_GetSize( p_stream, &dummy ) != VLC_SUCCESS )
+ s.setMaxSequentialRead( 2048 );
+ else
+ s.setMaxSequentialRead( 1024 * 2048 );
+#endif
+ f = FileRef( &s, false, AudioProperties::ReadStyle::Fast );
#else // !TAGLIB_VERSION_1_11
char *psz_path = vlc_uri2path( psz_uri );
free( psz_uri );