vdr shutdown handling / streamdev plugin

Message ID 455B17EC.3080009@gmx.de
State New
Headers

Commit Message

Udo Richter Nov. 15, 2006, 1:36 p.m. UTC
  Jörg Wendel wrote:
>> For plugin developers, I suggest to keep it simple in there. Its
>> probably a good idea to tr() the string just once and cache it afterwards.
> 
> this would be a nice change in the streamdev plugin.

The attached patch does it.
This patch has one side effect: The message wont be re-translated if the 
selected VDR OSD language is changed, you have to restart to see 
language changes.

Cheers,

Udo
  

Patch

--- streamdev-server.c.bak	2006-11-15 14:29:20.000000000 +0100
+++ streamdev-server.c	2006-11-15 14:30:51.000000000 +0100
@@ -59,7 +59,9 @@ 
 {
 	if (cStreamdevServer::Active())
 	{
-		return tr("Streaming active");
+		static const char *Message = NULL;
+		if (!Message) Message = tr("Streaming active");
+		return Message;
 	}
 	return NULL;
 }