diff stream/stream_radio.c @ 23703:9fb716ab06a3

Avoid code duplication and ugly config.h hack by using av_strlcat/av_strlcpy instead of plain strlcat/strlcpy
author reimar
date Thu, 05 Jul 2007 22:01:07 +0000
parents f6b20f40a854
children 4587edae1790
line wrap: on
line diff
--- a/stream/stream_radio.c	Thu Jul 05 10:18:58 2007 +0000
+++ b/stream/stream_radio.c	Thu Jul 05 22:01:07 2007 +0000
@@ -63,6 +63,7 @@
 #include "mp_msg.h"
 #include "help_mp.h"
 #include "stream_radio.h"
+#include "libavutil/avstring.h"
 
 #ifdef USE_RADIO_CAPTURE
 #include "audio_in.h"
@@ -207,7 +208,7 @@
             char* tmp = *(channels++);
             char* sep = strchr(tmp,'-');
             if (!sep) continue; // Wrong syntax, but mplayer should not crash
-            strlcpy(priv->radio_channel_current->name, sep + 1,sizeof(priv->radio_channel_current->name)-1);
+            av_strlcpy(priv->radio_channel_current->name, sep + 1,sizeof(priv->radio_channel_current->name)-1);
 
             sep[0] = '\0';