[vlc-commits] [Git][videolan/vlc][3.0.x] 2 commits: packetizer: mpeg4: always initialize i_channels/i_rate/i_frame_length
Steve Lhomme (@robUx4)
gitlab at videolan.org
Fri Aug 21 12:16:20 UTC 2026
Steve Lhomme pushed to branch 3.0.x at VideoLAN / VLC
Commits:
91aebddf by Steve Lhomme at 2026-08-21T11:58:17+00:00
packetizer: mpeg4: always initialize i_channels/i_rate/i_frame_length
They are used to determine if the WAVE_FORMAT_MPEG_LOAS is used
since 38733d0685e7d5e7d9bc4ce604a16a9b43fd4ba3.
Fixes #29852
(cherry picked from commit a976accb31ac449717840b70e605e7113f637085)
Signed-off-by: Steve Lhomme <robux4 at ycbcr.xyz>
- - - - -
70140749 by Steve Lhomme at 2026-08-21T11:58:17+00:00
packetizer: mpeg4: only forward the amount of data available
(cherry picked from commit af209b8c14a9328e1da179bf3bfbde7684010854)
Signed-off-by: Steve Lhomme <robux4 at ycbcr.xyz>
- - - - -
1 changed file:
- modules/packetizer/mpeg4audio.c
Changes:
=====================================
modules/packetizer/mpeg4audio.c
=====================================
@@ -221,6 +221,9 @@ static int OpenPacketizer(vlc_object_t *p_this)
block_BytestreamInit(&p_sys->bytestream);
p_sys->b_latm_cfg = false;
p_sys->i_warnings = 0;
+ p_sys->i_channels = 0;
+ p_sys->i_rate = 0;
+ p_sys->i_frame_length = 0;
/* Set output properties */
p_dec->fmt_out.i_codec = VLC_CODEC_MP4A;
@@ -1192,6 +1195,10 @@ static block_t *PacketizeStreamBlock(decoder_t *p_dec, block_t **pp_block)
/* When we reach this point we already know we have enough
* data available. */
+ if (unlikely( block_BytestreamRemaining(&p_sys->bytestream) <
+ p_sys->i_header_size + p_sys->i_frame_size ))
+ return NULL; // need more data
+
p_out_buffer = block_Alloc(p_sys->i_frame_size);
if (!p_out_buffer) {
return NULL;
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/55d6515a89b2493a4e46eb601621e4679efbe609...701407497457c444303f22e4f11220e178ab471c
--
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/55d6515a89b2493a4e46eb601621e4679efbe609...701407497457c444303f22e4f11220e178ab471c
You're receiving this email because of your account on code.videolan.org. Manage all notifications: https://code.videolan.org/-/profile/notifications | Help: https://code.videolan.org/help
More information about the vlc-commits
mailing list