changeset 750:5d8556c9949c trunk

[svn] - handle condition where track_name is not there, but stream_name is.
author nenolod
date Wed, 28 Feb 2007 07:01:26 -0800
parents 26ff35aa9b2b
children 3c1e835ebd68
files ChangeLog src/madplug/input.c
diffstat 2 files changed, 32 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Wed Feb 28 04:38:53 2007 -0800
+++ b/ChangeLog	Wed Feb 28 07:01:26 2007 -0800
@@ -1,3 +1,23 @@
+2007-02-28 12:38:53 +0000  William Pitcock <nenolod@sacredspiral.co.uk>
+  revision [1596]
+  - vtx input plugin based on a submission from Pavel Vymetalek.
+  
+  trunk/configure.ac            |    2 
+  trunk/src/vtx/Makefile        |   16 +
+  trunk/src/vtx/about.c         |   35 ++
+  trunk/src/vtx/ay8912.c        |  494 ++++++++++++++++++++++++++++++++++++++++++
+  trunk/src/vtx/ayemu.h         |   77 ++++++
+  trunk/src/vtx/ayemu_8912.h    |  150 ++++++++++++
+  trunk/src/vtx/ayemu_vtxfile.h |   92 +++++++
+  trunk/src/vtx/config.c        |   10 
+  trunk/src/vtx/info.c          |   49 ++++
+  trunk/src/vtx/lh5dec.c        |  297 +++++++++++++++++++++++++
+  trunk/src/vtx/vtx.c           |  330 ++++++++++++++++++++++++++++
+  trunk/src/vtx/vtx.h           |   28 ++
+  trunk/src/vtx/vtxfile.c       |  321 +++++++++++++++++++++++++++
+  13 files changed, 1900 insertions(+), 1 deletion(-)
+
+
 2007-02-28 10:14:00 +0000  William Pitcock <nenolod@sacredspiral.co.uk>
   revision [1594]
   - using mad.pc makes us dependant on a nonstandard packaging of mad -- 
--- a/src/madplug/input.c	Wed Feb 28 04:38:53 2007 -0800
+++ b/src/madplug/input.c	Wed Feb 28 07:01:26 2007 -0800
@@ -445,7 +445,12 @@
         info->title = g_strdup(track_name);
         info->tuple->track_name = g_strdup(track_name);
         info->tuple->album_name = g_strdup(stream_name);
-        tmp = g_strdup_printf("%s (%s)", track_name, stream_name);
+
+        if (track_name != NULL)
+            tmp = g_strdup_printf("%s (%s)", track_name, stream_name);
+        else
+	    tmp = g_strdup(stream_name);
+
         mad_plugin->set_info(tmp,
                              -1, // indicates the stream is unseekable
                              info->bitrate, info->freq, info->channels);
@@ -506,7 +511,12 @@
         madinfo->title = g_strdup(track_name);
         madinfo->tuple->track_name = g_strdup(track_name);
         madinfo->tuple->album_name = g_strdup(stream_name);
-        tmp = g_strdup_printf("%s (%s)", track_name, stream_name);
+
+        if (track_name != NULL)
+            tmp = g_strdup_printf("%s (%s)", track_name, stream_name);
+        else
+	    tmp = g_strdup(stream_name);
+
         mad_plugin->set_info(tmp,
                              -1, // indicate the stream is unseekable
 			     madinfo->bitrate, madinfo->freq, madinfo->channels);