tsmux: Fix two more uses of gst_buffer_map
authorJan Alexander Steffens (heftig) <jan.steffens@ltnglobal.com>
Mon, 16 Oct 2023 21:50:16 +0000 (23:50 +0200)
committerGStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org>
Fri, 20 Oct 2023 08:53:19 +0000 (08:53 +0000)
The buffers should be used for writing.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5516>

subprojects/gst-plugins-bad/gst/mpegtsmux/tsmux/tsmux.c

index a8a39917c779fa7aeaa647dde5cb35c8015fd78b..b55b763f38c3b792682ca8a550d4849636506da3 100644 (file)
@@ -871,7 +871,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);
@@ -1637,7 +1637,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))