mpegtsmux: Correctly set ISO-639 language descriptor

fixes #1340
Only 2 of the necessary 3 letters were copied because the teminating '\0'
needs to be counted, too - cf.
https://developer.gnome.org/glib/stable/glib-String-Utility-Functions.html#g-strlcat

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1375>
This commit is contained in:
Andreas Frisch 2020-06-25 16:38:30 +02:00 committed by GStreamer Merge Bot
parent cceca1ffe8
commit 297e5022ca

View file

@ -705,10 +705,12 @@ tsmux_create_stream (TsMux * mux, guint stream_type, guint16 pid,
mux->streams = g_list_prepend (mux->streams, stream);
mux->nb_streams++;
if (language)
g_strlcat (stream->language, language, 3 * sizeof (gchar));
else
g_strlcat (stream->language, "eng", 3 * sizeof (gchar));
if (language) {
strncpy (stream->language, language, 4);
stream->language[3] = 0;
} else {
strcpy (stream->language, "eng");
}
return stream;
}