Steve Lhomme pushed to branch 3.0.x at VideoLAN / VLC
Commits:
d8973ad3 by Steve Lhomme at 2025-08-26T08:07:57+00:00
demux: avi: cut QNap title on first invalid character
We should only use valid UTF-8 metadata.
We don't know if this is supposed to be ASCII, UTF-8 or something else.
This is the same code as EnsureUTF8() except we cut the rest of the string if
it's invalid.
Ref. #28976
(cherry picked from commit 9c5ea58677b9f86e278a4c2c0b0fa738bf72ccd4)
- - - - -
1 changed file:
- modules/demux/avi/avi.c
Changes:
=====================================
modules/demux/avi/avi.c
=====================================
@@ -1114,7 +1114,21 @@ static void AVI_SendFrame( demux_t *p_demux, avi_track_t
*tk, block_t *p_frame )
if( *psz_osd != 0 )
{
psz_osd[23] = 0;
- if( !psz_title || strncmp( psz_osd, psz_title, 24 ) )
+ {
+ char *str = psz_osd;
+ ssize_t n;
+ uint32_t cp;
+
+ while ((n = vlc_towc(str, &cp)) != 0)
+ if (likely(n != -1))
+ str += n;
+ else
+ {
+ *str = '\0';
+ break;
+ }
+ }
+ if( psz_osd[0] && ( !psz_title || strncmp( psz_osd,
psz_title, 24 ) ) )
{
vlc_meta_Set( p_sys->meta, vlc_meta_Title, psz_osd );
p_sys->updates |= INPUT_UPDATE_META;
View it on GitLab:
https://code.videolan.org/videolan/vlc/-/commit/d8973ad341a352addfd6344cde15214431a8aa2d
--
View it on GitLab:
https://code.videolan.org/videolan/vlc/-/commit/d8973ad341a352addfd6344cde15214431a8aa2d
You're receiving this email because of your account on code.videolan.org.
VideoLAN code repository instance
_______________________________________________
vlc-commits mailing list
vlc-commits@videolan.org
https://mailman.videolan.org/listinfo/vlc-commits