Sisyphus repositório
Última atualização: 13 outubro 2019 | SRPMs: 17515 | Visitas: 15264064
en ru br
ALT Linux repositórios
S:2.0.0-alt2_16

Group :: Sistema/Bibliotecas
RPM: libvalhalla

 Main   Changelog   Spec   Patches   Sources   Download   Gear   Bugs e FR  Repocop 

Patch: libvalhalla-2.0.0-stream-title.patch
Download


# HG changeset patch
# User Mathieu Schroeter <mathieu@schroetersa.ch>
# Date 1332952067 -7200
# Node ID 6f9d0738d006544e5d2493907b190aa5e3e38c9b
# Parent  5508edec804ac5c708ad2ff68ddc22b1713e2e13
we use stream_title instead of title when there is already a title; it is the case with the ogg container
diff -r 5508edec804a -r 6f9d0738d006 src/metadata.c
--- a/src/metadata.c	Wed Mar 28 18:23:34 2012 +0200
+++ b/src/metadata.c	Wed Mar 28 18:27:47 2012 +0200
@@ -108,6 +108,7 @@
   { VALHALLA_METADATA_TITLE,               VALHALLA_META_GRP_TITLES         },
   { VALHALLA_METADATA_TITLE_ALTERNATIVE,   VALHALLA_META_GRP_TITLES         },
   { VALHALLA_METADATA_TITLE_SHOW,          VALHALLA_META_GRP_TITLES         },
+  { VALHALLA_METADATA_TITLE_STREAM,        VALHALLA_META_GRP_TITLES         },
 
   { NULL,                                  VALHALLA_META_GRP_NIL            },
 };
diff -r 5508edec804a -r 6f9d0738d006 src/parser.c
--- a/src/parser.c	Wed Mar 28 18:23:34 2012 +0200
+++ b/src/parser.c	Wed Mar 28 18:27:47 2012 +0200
@@ -307,8 +307,17 @@
     AVStream *st = ctx->streams[i];
     while ((tag = av_metadata_get (st->metadata,
                                    "", tag, AV_METADATA_IGNORE_SUFFIX)))
-      vh_metadata_add_auto (&meta, tag->key, tag->value,
+    {
+      const char *key = tag->key;
+
+      /* without this check, it is possible to have more than one title */
+      if (vh_metadata_get (meta, VALHALLA_METADATA_TITLE, 0, &title_tag)
+          && !strcasecmp (key, VALHALLA_METADATA_TITLE))
+        key = VALHALLA_METADATA_TITLE_STREAM;
+
+      vh_metadata_add_auto (&meta, key, tag->value,
                             VALHALLA_LANG_UNDEF, &pl);
+    }
   }
 
   if (!meta)
diff -r 5508edec804a -r 6f9d0738d006 src/valhalla.h
--- a/src/valhalla.h	Wed Mar 28 18:23:34 2012 +0200
+++ b/src/valhalla.h	Wed Mar 28 18:27:47 2012 +0200
@@ -246,6 +246,7 @@
 #define VALHALLA_METADATA_TITLE                      "title"
 #define VALHALLA_METADATA_TITLE_ALTERNATIVE          "title_alternative"
 #define VALHALLA_METADATA_TITLE_SHOW                 "title_show"
+#define VALHALLA_METADATA_TITLE_STREAM               "title_stream"
 
 /**
  * @}
 
projeto & código: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
mantenedor atual: Michael Shigorin
mantenedor da tradução: Fernando Martini aka fmartini © 2009