[totem/wip/hadess/simplify-text-sub: 2/4] backend: Always add a "None" choice for subtitles
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [totem/wip/hadess/simplify-text-sub: 2/4] backend: Always add a "None" choice for subtitles
- Date: Fri, 11 Feb 2022 20:26:50 +0000 (UTC)
commit 8800ed62726347c19daaf945818ad4217c9b89da
Author: Bastien Nocera <hadess hadess net>
Date: Fri Feb 11 20:16:22 2022 +0100
backend: Always add a "None" choice for subtitles
Because even if there's no subtitles, there's "None".
src/backend/bacon-video-widget.c | 15 +++++++--------
1 file 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)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]