v2: - Allocate buffer for wg_parser_stream_get_tag() dynamically. I had to move #include "wmsdk.h" from gst_private.h header to be able to include ntstatus.h (to check the result in wg_parser_stream_get_tag()_. wmsdk.h includes nserror.h which redefines STATUS_SEVERITY_ which causes compiler warnings. I checked with Win SDK 22621 that the relevant parts of nserror.h, wmsdk.h and ntstatus.h are the same, so it looks like the only right way to workaround that is not to include wmsdk.h where not necessary; - WG_PARSER_TAG_MAX -> WG_PARSER_TAG_COUNT; - add has_buffer instead of setting has_tags in sink_chain_cb(); - use gst_buffer_extract() instead of mapping the buffer. gst_buffer_extract_dup() does not fit well because the string is stored without terminating 0 char and it is probably more straightforward to continue adding that in query_tags() at once rather than deal with non zero terminated strings elsewhere. Also given that for language we get zero terminated string at once from gst_tag_list_get_string().