adaptivedemux: Fix handling closed caption streams

Fix a typo "CLOSED_CAPTION" -> "CLOSED-CAPTION" and
a broken if statement that always bailed out for
closed captions

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6985>
This commit is contained in:
Jan Schmidt 2024-06-02 11:40:04 +03:00 committed by GStreamer Marge Bot
parent 2bd682d326
commit 73480e60d0
2 changed files with 5 additions and 4 deletions

View file

@ -1317,7 +1317,7 @@ gst_m3u8_get_hls_media_type_from_string (const gchar * type_name)
return GST_HLS_MEDIA_TYPE_VIDEO;
if (strcmp (type_name, "SUBTITLES") == 0)
return GST_HLS_MEDIA_TYPE_SUBTITLES;
if (strcmp (type_name, "CLOSED_CAPTIONS") == 0)
if (strcmp (type_name, "CLOSED-CAPTIONS") == 0)
return GST_HLS_MEDIA_TYPE_CLOSED_CAPTIONS;
return GST_HLS_MEDIA_TYPE_INVALID;
@ -1406,7 +1406,7 @@ gst_m3u8_parse_media (gchar * desc, const gchar * base_uri)
if (media->group_id == NULL || media->name == NULL)
goto required_attributes_missing;
if (media->mtype == GST_HLS_MEDIA_TYPE_CLOSED_CAPTIONS)
if (media->mtype == GST_HLS_MEDIA_TYPE_CLOSED_CAPTIONS && media->uri != NULL)
goto uri_with_cc;
GST_DEBUG ("media: %s, group '%s', name '%s', uri '%s', %s %s %s, lang=%s",

View file

@ -2650,7 +2650,7 @@ gst_m3u8_get_hls_media_type_from_string (const gchar * type_name)
return GST_HLS_RENDITION_STREAM_TYPE_VIDEO;
if (strcmp (type_name, "SUBTITLES") == 0)
return GST_HLS_RENDITION_STREAM_TYPE_SUBTITLES;
if (strcmp (type_name, "CLOSED_CAPTIONS") == 0)
if (strcmp (type_name, "CLOSED-CAPTIONS") == 0)
return GST_HLS_RENDITION_STREAM_TYPE_CLOSED_CAPTIONS;
return GST_HLS_RENDITION_STREAM_TYPE_INVALID;
@ -2736,7 +2736,8 @@ gst_m3u8_parse_media (gchar * desc, const gchar * base_uri)
if (media->group_id == NULL || media->name == NULL)
goto required_attributes_missing;
if (media->mtype == GST_HLS_RENDITION_STREAM_TYPE_CLOSED_CAPTIONS)
if (media->mtype == GST_HLS_RENDITION_STREAM_TYPE_CLOSED_CAPTIONS
&& media->uri != NULL)
goto uri_with_cc;
GST_DEBUG ("media: %s, group '%s', name '%s', uri '%s', %s %s %s, lang=%s",