h264/h265parse: Add VideoTimeCodeMeta to the outgoing buffer
authorJan Alexander Steffens (heftig) <jan.steffens@ltnglobal.com>
Tue, 2 Feb 2021 17:25:31 +0000 (18:25 +0100)
committerJan Alexander Steffens (heftig) <jan.steffens@ltnglobal.com>
Tue, 2 Feb 2021 17:44:49 +0000 (18:44 +0100)
commit0f084d46247f9009584b482cea8196b5b871cc73
treebf042839e5bcf75e15296d55014c9ddded7f3943
parent956d6e8ff7eaa663a4f8ebcb6d7d7d6ef3b18e33
h264/h265parse: Add VideoTimeCodeMeta to the outgoing buffer

The parsers attempted to add the meta to the incoming buffer, which
might not be the outgoing buffer or may not have been writable yet.

To fix this, call `gst_buffer_make_writable` earlier and make sure to
use the `parse_buffer` to add the meta.

Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/issues/1521

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2002>
gst/videoparsers/gsth264parse.c
gst/videoparsers/gsth265parse.c