[vlc-commits] [Git][videolan/vlc][3.0.x] 3 commits: substx3g: fix file name comment
Steve Lhomme (@robUx4)
gitlab at videolan.org
Tue Mar 18 07:31:55 UTC 2025
Steve Lhomme pushed to branch 3.0.x at VideoLAN / VLC
Commits:
ec194c04 by Johannes Kauffmann at 2025-03-14T21:20:42+01:00
substx3g: fix file name comment
(cherry picked from commit 576dc57489c40485034b1fd82b0f6ded2f9cde62)
- - - - -
e5cc1bf6 by Johannes Kauffmann at 2025-03-14T21:28:09+01:00
substx3g: factor error handling
(cherry picked from commit 18b1c9d8fd8ce0a5fbd4274ebe2064b66dea8e2f)
- - - - -
a381bf5b by Johannes Kauffmann at 2025-03-14T21:29:15+01:00
substx3g: fix leak on error
(cherry picked from commit 80ca615d96cddb7493ef1183a32c42efc23d0cfe)
- - - - -
1 changed file:
- modules/codec/substx3g.c
Changes:
=====================================
modules/codec/substx3g.c
=====================================
@@ -1,5 +1,5 @@
/*****************************************************************************
- * substx3gsub.c : MP4 tx3g subtitles decoder
+ * substx3g.c : MP4 tx3g subtitles decoder
*****************************************************************************
* Copyright (C) 2014 VLC authors and VideoLAN
*
@@ -334,17 +334,16 @@ static int Decode( decoder_t *p_dec, block_t *p_block )
if ( i_psz_bytelength > 2 &&
( !memcmp( p_pszstart, "\xFE\xFF", 2 ) || !memcmp( p_pszstart, "\xFF\xFE", 2 ) )
)
- {
psz_subtitle = FromCharset( "UTF-16", p_pszstart, i_psz_bytelength );
- if ( !psz_subtitle )
- return VLCDEC_SUCCESS;
- }
else
- {
psz_subtitle = strndup( (const char*) p_pszstart, i_psz_bytelength );
- if ( !psz_subtitle )
- return VLCDEC_SUCCESS;
+
+ if ( !psz_subtitle )
+ {
+ block_Release( p_block );
+ return VLCDEC_SUCCESS;
}
+
p_buf += i_psz_bytelength + sizeof(uint16_t);
for( uint16_t i=0; i < i_psz_bytelength; i++ )
@@ -358,6 +357,7 @@ static int Decode( decoder_t *p_dec, block_t *p_block )
{
text_segment_Delete( p_segment3g->s );
free( p_segment3g );
+ block_Release( p_block );
return VLCDEC_SUCCESS;
}
@@ -367,6 +367,7 @@ static int Decode( decoder_t *p_dec, block_t *p_block )
{
text_segment_Delete( p_segment3g->s );
free( p_segment3g );
+ block_Release( p_block );
return VLCDEC_SUCCESS;
}
subpicture_updater_sys_t *p_spu_sys = p_spu->updater.p_sys;
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/2ad4e0b252d4f96f33d779e2d7f237b29aa5690c...a381bf5bc0883db0edaedbf9d88ef9282b4af055
--
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/2ad4e0b252d4f96f33d779e2d7f237b29aa5690c...a381bf5bc0883db0edaedbf9d88ef9282b4af055
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