mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-22 23:28:16 +00:00
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:
parent
cceca1ffe8
commit
297e5022ca
1 changed files with 6 additions and 4 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue