[vlc-commits] [Git][videolan/vlc][3.0.x] taglib: Opening a file for reading if possible
Jean-Baptiste Kempf (@jbk)
gitlab at videolan.org
Fri Feb 17 07:29:44 UTC 2023
Jean-Baptiste Kempf pushed to branch 3.0.x at VideoLAN / VLC
Commits:
792cddc6 by Aleksey Vasenev at 2023-02-17T07:16:48+00:00
taglib: Opening a file for reading if possible
When metadata is read, the file is opened for writing. This causes the
file to be deleted in FS-Cache when caching network file systems.
Fixes #27848
- - - - -
1 changed file:
- modules/meta_engine/taglib.cpp
Changes:
=====================================
modules/meta_engine/taglib.cpp
=====================================
@@ -58,6 +58,9 @@
#define TAGLIB_VERSION_1_11 VERSION_INT(1,11,0)
+#if TAGLIB_VERSION >= TAGLIB_VERSION_1_11
+#include <tfilestream.h>
+#endif
#include <fileref.h>
#include <tag.h>
#include <tbytevector.h>
@@ -872,11 +875,21 @@ static int ReadMeta( vlc_object_t* p_this)
free( psz_path );
return VLC_EGENERIC;
}
+#if TAGLIB_VERSION >= TAGLIB_VERSION_1_11
+ FileStream stream( wpath, true );
+ f = FileRef( &stream );
+#else /* TAGLIB_VERSION */
f = FileRef( wpath );
+#endif /* TAGLIB_VERSION */
free( wpath );
-#else
+#else /* _WIN32 */
+#if TAGLIB_VERSION >= TAGLIB_VERSION_1_11
+ FileStream stream( psz_path, true );
+ f = FileRef( &stream );
+#else /* TAGLIB_VERSION */
f = FileRef( psz_path );
-#endif
+#endif /* TAGLIB_VERSION */
+#endif /* _WIN32 */
free( psz_path );
#endif /* VLC_WINSTORE_APP */
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/792cddc63f22c700da51dbecf0e3ca27253ad3de
--
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/792cddc63f22c700da51dbecf0e3ca27253ad3de
You're receiving this email because of your account on code.videolan.org.
VideoLAN code repository instance
More information about the vlc-commits
mailing list