diff options
author | Tim-Philipp Müller <tim@centricular.com> | 2021-05-23 16:10:53 +0100 |
---|---|---|
committer | Tim-Philipp Müller <tim@centricular.com> | 2021-05-23 17:20:16 +0100 |
commit | 0151276d7f89cfe84050c67823966d2579dbc13a (patch) | |
tree | a7a06f3ef30ba35055e2cd1fe7b1e5d7b5f4b3e3 /gst | |
parent | 87d97f01f59e73a906a488308bfff8b872c93c1a (diff) | |
download | gstreamer-plugins-bad-0151276d7f89cfe84050c67823966d2579dbc13a.tar.gz |
Use new gst_buffer_new_copy()
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2279>
Diffstat (limited to 'gst')
-rw-r--r-- | gst/videoparsers/gstav1parse.c | 8 | ||||
-rw-r--r-- | gst/videoparsers/gstmpeg4videoparse.c | 2 |
2 files changed, 5 insertions, 5 deletions
diff --git a/gst/videoparsers/gstav1parse.c b/gst/videoparsers/gstav1parse.c index a2c0edca8..03aae0800 100644 --- a/gst/videoparsers/gstav1parse.c +++ b/gst/videoparsers/gstav1parse.c @@ -802,7 +802,7 @@ gst_av1_parse_push_data (GstAV1Parse * self, GstBaseParseFrame * frame, _write_leb128 (size_data, &size_len, len); gst_adapter_push (self->cache_out, - gst_buffer_new_wrapped (g_memdup (size_data, size_len), size_len)); + gst_buffer_new_copy (size_data, size_len)); gst_adapter_push (self->cache_out, buf); } @@ -814,7 +814,7 @@ gst_av1_parse_push_data (GstAV1Parse * self, GstBaseParseFrame * frame, _write_leb128 (size_data, &size_len, len); gst_adapter_push (self->cache_out, - gst_buffer_new_wrapped (g_memdup (size_data, size_len), size_len)); + gst_buffer_new_copy (size_data, size_len)); gst_adapter_push (self->cache_out, buf); } } @@ -915,7 +915,7 @@ gst_av1_parse_convert_to_annexb (GstAV1Parse * self, GstAV1OBU * obu, /* frame_unit_size */ _write_leb128 (size_data, &size_len, len2); gst_adapter_push (self->cache_out, - gst_buffer_new_wrapped (g_memdup (size_data, size_len), size_len)); + gst_buffer_new_copy (size_data, size_len)); gst_adapter_push (self->cache_out, buf2); } @@ -1002,7 +1002,7 @@ gst_av1_parse_cache_one_obu (GstAV1Parse * self, GstAV1OBU * obu, g_assert (self->in_align == GST_AV1_PARSE_ALIGN_TEMPORAL_UNIT_ANNEX_B); gst_av1_parse_convert_to_annexb (self, obu, frame_complete); } else { - buf = gst_buffer_new_wrapped (g_memdup (data, size), size); + buf = gst_buffer_new_copy (data, size); gst_adapter_push (self->cache_out, buf); } } diff --git a/gst/videoparsers/gstmpeg4videoparse.c b/gst/videoparsers/gstmpeg4videoparse.c index 4b133ada6..894f34339 100644 --- a/gst/videoparsers/gstmpeg4videoparse.c +++ b/gst/videoparsers/gstmpeg4videoparse.c @@ -304,7 +304,7 @@ gst_mpeg4vparse_process_config (GstMpeg4VParse * mp4vparse, if (mp4vparse->config != NULL) gst_buffer_unref (mp4vparse->config); - mp4vparse->config = gst_buffer_new_wrapped (g_memdup (data, size), size); + mp4vparse->config = gst_buffer_new_copy (data, size); /* trigger src caps update */ mp4vparse->update_caps = TRUE; |