[vlc-commits] [Git][videolan/vlc][3.0.x] stream_out: rtpfmt: trim raw video packets to written length

Steve Lhomme (@robUx4) gitlab at videolan.org
Thu Sep 3 12:25:30 UTC 2026



Steve Lhomme pushed to branch 3.0.x at VideoLAN / VLC


Commits:
e2d8fa86 by Tristan Matthews at 2026-09-02T08:15:53-04:00
stream_out: rtpfmt: trim raw video packets to written length

Set i_buffer to the number of bytes actually written before sending.

Fixes #30083

(cherry picked from commit c785d5da010b2607aaf409f378373fb826c22cd5)

- - - - -


1 changed file:

- modules/stream_out/rtpfmt.c


Changes:

=====================================
modules/stream_out/rtpfmt.c
=====================================
@@ -1839,6 +1839,10 @@ static int rtp_packetize_rawvideo( sout_stream_id_sys_t *id, block_t *in, vlc_fo
             else vlc_assert_unreachable();
         }
 
+        /* Block was allocated before knowing how many (partial) lines fit,
+           so trim it to the bytes written. */
+        out->i_buffer = p_outdata - out->p_buffer;
+
         /* rtp common header */
         rtp_packetize_common( id, out, i_line_number >= i_height,
                 (in->i_pts > VLC_TICK_INVALID ? in->i_pts : in->i_dts) );



View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/e2d8fa86e94e06058494e849743c1af76156ac5a

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/e2d8fa86e94e06058494e849743c1af76156ac5a
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