tsmux: Fix two more uses of gst_buffer_map

The buffers should be used for writing.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5496>
This commit is contained in:
Jan Alexander Steffens (heftig) 2023-10-16 23:50:16 +02:00 committed by GStreamer Marge Bot
parent bce1d121ba
commit 5128975a36

View file

@ -878,7 +878,7 @@ tsmux_packet_out (TsMux * mux, GstBuffer * buf, gint64 pcr)
goto error;
}
gst_buffer_map (buf, &map, GST_MAP_READ);
gst_buffer_map (buf, &map, GST_MAP_WRITE);
tsmux_write_ts_header (mux, map.data, &stream->pi, &payload_len,
&payload_offs, 0);
gst_buffer_unmap (buf, &map);
@ -1644,7 +1644,7 @@ tsmux_write_stream_packet (TsMux * mux, TsMuxStream * stream)
if (!tsmux_get_buffer (mux, &buf))
return FALSE;
gst_buffer_map (buf, &map, GST_MAP_READ);
gst_buffer_map (buf, &map, GST_MAP_WRITE);
if (!tsmux_write_ts_header (mux, map.data, pi, &payload_len, &payload_offs,
pi->stream_avail))