[vlc-commits] [Git][videolan/vlc][master] 3 commits: cvdsub: remove write-only i_image_length
Steve Lhomme (@robUx4)
gitlab at videolan.org
Thu Sep 25 09:47:00 UTC 2025
Steve Lhomme pushed to branch master at VideoLAN / VLC
Commits:
693bd1e7 by Steve Lhomme at 2025-09-25T09:24:11+00:00
cvdsub: remove write-only i_image_length
- - - - -
580281a9 by Steve Lhomme at 2025-09-25T09:24:11+00:00
scvdsub: remove write-only i_image_length
- - - - -
946aca24 by Steve Lhomme at 2025-09-25T09:24:11+00:00
scvdsub: remove write-only metadata_length
And unused metadata_offset.
- - - - -
2 changed files:
- modules/codec/cvdsub.c
- modules/codec/svcdsub.c
Changes:
=====================================
modules/codec/cvdsub.c
=====================================
@@ -86,7 +86,6 @@ typedef struct
uint16_t i_image_offset; /* offset from subtitle_data to compressed
image data */
- size_t i_image_length; /* size of the compressed image data */
size_t first_field_offset; /* offset of even raster lines */
size_t second_field_offset; /* offset of odd raster lines */
size_t metadata_offset; /* offset to data describing the image */
@@ -321,11 +320,10 @@ static void ParseHeader( decoder_t *p_dec, block_t *p_block )
p_sys->metadata_length = p_sys->i_spu_size - p_sys->metadata_offset;
p_sys->i_image_offset = 4;
- p_sys->i_image_length = p_sys->metadata_offset - p_sys->i_image_offset;
#ifdef DEBUG_CVDSUB
- msg_Dbg( p_dec, "total size: %zu image size: %zu",
- p_sys->i_spu_size, p_sys->i_image_length );
+ msg_Dbg( p_dec, "total size: %zu metadata size: %zu",
+ p_sys->i_spu_size, p_sys->metadata_length );
#endif
}
=====================================
modules/codec/svcdsub.c
=====================================
@@ -89,10 +89,7 @@ typedef struct
uint16_t i_image_offset; /* offset from subtitle_data to compressed
image data */
- size_t i_image_length; /* size of the compressed image data */
size_t second_field_offset; /* offset of odd raster lines */
- size_t metadata_offset; /* offset to data describing the image */
- size_t metadata_length; /* length of metadata */
vlc_tick_t i_duration; /* how long to display the image, 0 stands
for "until next subtitle" */
@@ -417,16 +414,14 @@ static void ParseHeader( decoder_t *p_dec, block_t *p_block )
p_sys->second_field_offset = GETINT16(p);
i_buffer -= 2;
p_sys->i_image_offset = p - p_block->p_buffer;
- p_sys->i_image_length = p_sys->i_spu_size - p_sys->i_image_offset;
- p_sys->metadata_length = p_sys->i_image_offset;
#ifndef NDEBUG
msg_Dbg( p_dec, "x-start: %d, y-start: %d, width: %d, height %d, "
- "spu size: %zu, duration: %"PRIu64" (d:%zu p:%"PRIu16")",
+ "spu size: %zu, duration: %"PRIu64" (p:%"PRIu16")",
p_sys->i_x_start, p_sys->i_y_start,
p_sys->i_width, p_sys->i_height,
p_sys->i_spu_size, p_sys->i_duration,
- p_sys->i_image_length, p_sys->i_image_offset);
+ p_sys->i_image_offset);
for( i = 0; i < 4; i++ )
{
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/6f6fb3451c2eba07ab5830018f6c410ca6b9f274...946aca24e36b03da32940e95074222f9fa484739
--
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/6f6fb3451c2eba07ab5830018f6c410ca6b9f274...946aca24e36b03da32940e95074222f9fa484739
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