summaryrefslogtreecommitdiff
path: root/src/backend/bacon-video-widget.c
diff options
context:
space:
mode:
authorBastien Nocera <hadess@hadess.net>2022-02-11 20:16:22 +0100
committerBastien Nocera <hadess@hadess.net>2022-02-13 11:13:21 +0100
commit31eed7439bcf2953517c18347444150f54646e7e (patch)
tree456fce34c0a8369452c46168ff53dc8e7214f2db /src/backend/bacon-video-widget.c
parentb03deca446574c6ffdade038c54fc5e6ed2e494f (diff)
downloadtotem-31eed7439bcf2953517c18347444150f54646e7e.tar.gz
backend: Always add a "None" choice for subtitles
Because even if there's no subtitles, there's "None".
Diffstat (limited to 'src/backend/bacon-video-widget.c')
-rw-r--r--src/backend/bacon-video-widget.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/src/backend/bacon-video-widget.c b/src/backend/bacon-video-widget.c
index f500607ac..804fe43be 100644
--- a/src/backend/bacon-video-widget.c
+++ b/src/backend/bacon-video-widget.c
@@ -2919,17 +2919,16 @@ static gboolean
update_subtitles_tracks (BaconVideoWidget *bvw)
{
g_autolist(BvwLangInfo) list;
+ BvwLangInfo *info;
list = get_lang_list_for_type (bvw, "TEXT");
- /* Add "none" if there's subs */
- if (list != NULL || bvw->subtitle_uri != NULL) {
- BvwLangInfo *info;
- info = g_new0 (BvwLangInfo, 1);
- info->id = BVW_TRACK_NONE;
- info->codec = g_strdup ("none");
- list = g_list_prepend (list, info);
- }
+ /* Add "None" */
+ info = g_new0 (BvwLangInfo, 1);
+ info->id = BVW_TRACK_NONE;
+ info->codec = g_strdup ("none");
+ list = g_list_prepend (list, info);
+
if (bvw_lang_infos_equal (list, bvw->subtitles))
return FALSE;
if (bvw->subtitles)