[vlc-commits] [Git][videolan/vlc][master] 2 commits: demux: ogg: use bs_skip instead of bs_read
Steve Lhomme (@robUx4)
gitlab at videolan.org
Mon Aug 5 07:35:55 UTC 2024
Steve Lhomme pushed to branch master at VideoLAN / VLC
Commits:
18a41cb3 by Alexandre Janniaux at 2024-08-05T07:21:30+00:00
demux: ogg: use bs_skip instead of bs_read
When the value is not used, bs_skip should be used instead.
- - - - -
45c071e7 by Alexandre Janniaux at 2024-08-05T07:21:30+00:00
packetizer: mpeg4video: use bs_skip instead of bs_read
When the value is not used, bs_skip should be used instead.
- - - - -
2 changed files:
- modules/demux/ogg.c
- modules/packetizer/mpeg4video.c
Changes:
=====================================
modules/demux/ogg.c
=====================================
@@ -2719,25 +2719,25 @@ static bool Ogg_ReadTheoraHeader( logical_stream_t *p_stream,
i_minor = bs_read( &bitstream, 8 ); /* minor version num */
i_subminor = bs_read( &bitstream, 8 ); /* subminor version num */
- bs_read( &bitstream, 16 ) /*<< 4*/; /* width */
- bs_read( &bitstream, 16 ) /*<< 4*/; /* height */
- bs_read( &bitstream, 24 ); /* frame width */
- bs_read( &bitstream, 24 ); /* frame height */
- bs_read( &bitstream, 8 ); /* x offset */
- bs_read( &bitstream, 8 ); /* y offset */
+ bs_skip( &bitstream, 16 ) /*<< 4*/; /* width */
+ bs_skip( &bitstream, 16 ) /*<< 4*/; /* height */
+ bs_skip( &bitstream, 24 ); /* frame width */
+ bs_skip( &bitstream, 24 ); /* frame height */
+ bs_skip( &bitstream, 8 ); /* x offset */
+ bs_skip( &bitstream, 8 ); /* y offset */
i_fps_numerator = bs_read( &bitstream, 32 );
i_fps_denominator = bs_read( &bitstream, 32 );
i_fps_denominator = __MAX( i_fps_denominator, 1 );
- bs_read( &bitstream, 24 ); /* aspect_numerator */
- bs_read( &bitstream, 24 ); /* aspect_denominator */
+ bs_skip( &bitstream, 24 ); /* aspect_numerator */
+ bs_skip( &bitstream, 24 ); /* aspect_denominator */
p_stream->fmt.video.i_frame_rate = i_fps_numerator;
p_stream->fmt.video.i_frame_rate_base = i_fps_denominator;
- bs_read( &bitstream, 8 ); /* colorspace */
+ bs_skip( &bitstream, 8 ); /* colorspace */
p_stream->fmt.i_bitrate = bs_read( &bitstream, 24 );
- bs_read( &bitstream, 6 ); /* quality */
+ bs_skip( &bitstream, 6 ); /* quality */
i_keyframe_frequency_force = 1 << bs_read( &bitstream, 5 );
@@ -2975,7 +2975,7 @@ static bool Ogg_ReadFlacStreamInfo( demux_t *p_demux, logical_stream_t *p_stream
bs_init( &s, p_oggpacket->packet, p_oggpacket->bytes );
- bs_read( &s, 1 );
+ bs_skip( &s, 1 );
if( p_oggpacket->bytes > 0 && bs_read( &s, 7 ) != 0 )
{
msg_Dbg( p_demux, "Invalid FLAC STREAMINFO metadata" );
=====================================
modules/packetizer/mpeg4video.c
=====================================
@@ -476,7 +476,7 @@ static int ParseVO( decoder_t *p_dec, block_t *p_vo )
};
if( bs_read1( &s ) ) /* video_signal_type */
{
- bs_read( &s, 3 );
+ bs_skip( &s, 3 );
colour.full_range_flag = bs_read( &s, 1 );
if( bs_read( &s, 1 ) ) /* colour description */
{
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/9915f1b5528836ba6eaec7d0e2ecadea7c0a283b...45c071e76e8a7bf0e2e4503d1a5140f4b777ff4a
--
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/9915f1b5528836ba6eaec7d0e2ecadea7c0a283b...45c071e76e8a7bf0e2e4503d1a5140f4b777ff4a
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