mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-25 19:21:06 +00:00
hlsng: Check caps are not null after parsing HLS CODECS tag
If the mime codec wasn't recognised, caps will be NULL and cause a critical Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6969>
This commit is contained in:
parent
7bd51afd04
commit
ef0e822559
1 changed files with 6 additions and 2 deletions
|
@ -2863,8 +2863,12 @@ gst_hls_variant_parse (gchar * data, const gchar * base_uri)
|
|||
g_free (stream->codecs);
|
||||
stream->codecs = g_strdup (v);
|
||||
stream->caps = gst_codec_utils_caps_from_mime_codec (stream->codecs);
|
||||
stream->codecs_stream_type =
|
||||
gst_hls_get_stream_type_from_caps (stream->caps);
|
||||
if (stream->caps != NULL) {
|
||||
stream->codecs_stream_type =
|
||||
gst_hls_get_stream_type_from_caps (stream->caps);
|
||||
} else {
|
||||
GST_WARNING ("Unhandled codec in CODECS tags: %s", v);
|
||||
}
|
||||
} else if (g_str_equal (a, "RESOLUTION")) {
|
||||
if (!int_from_string (v, &v, &stream->width))
|
||||
GST_WARNING ("Error while reading RESOLUTION width");
|
||||
|
|
Loading…
Reference in a new issue