tsmux: Don't memset in pad_stream when writing a PCR packet

tsmux_write_ts_header will write a stuffing adaptation field, so we
don't need to prefill the buffer.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5496>
This commit is contained in:
Jan Alexander Steffens (heftig) 2023-10-16 23:54:20 +02:00 committed by GStreamer Marge Bot
parent 2dbd89b036
commit 55658ad166

View file

@ -1556,8 +1556,6 @@ pad_stream (TsMux * mux, TsMuxStream * stream, gint64 cur_ts)
goto done;
}
memset (map.data, 0xFF, map.size);
new_pcr = write_new_pcr (mux, stream, get_current_pcr (mux, cur_ts),
get_next_pcr (mux, cur_ts));
if (new_pcr != -1) {
@ -1572,6 +1570,7 @@ pad_stream (TsMux * mux, TsMuxStream * stream, gint64 cur_ts)
goto done;
}
tsmux_write_null_ts_header (map.data);
memset (map.data + TSMUX_HEADER_LENGTH, 0xFF, TSMUX_PAYLOAD_LENGTH);
}
gst_buffer_unmap (buf, &map);