[MPlayer-dev-eng] [PATCH] Allow modifying "demuxer info" (title etc.)

Reimar Döffinger Reimar.Doeffinger at stud.uni-karlsruhe.de
Tue Aug 15 23:57:59 CEST 2006


Hello,
the attached patch makes MPlayer update metadata information and display
the new settings instead of just printing an less-than-useful warning.
IIRC some people wanted that kind of functionality for live Ogg streams.
Ok to apply?

Greetings,
Reimar Döffinger
-------------- next part --------------
Index: libmpdemux/demuxer.c
===================================================================
--- libmpdemux/demuxer.c	(revision 19410)
+++ libmpdemux/demuxer.c	(working copy)
@@ -938,7 +938,9 @@
       {
 	if(!strcasecmp(opt,info[2*n]))
 	  {
-	    mp_msg(MSGT_DEMUX, MSGL_WARN,MSGTR_DemuxerInfoAlreadyPresent,opt);
+	    mp_msg(MSGT_DEMUX, MSGL_INFO,MSGTR_DemuxerInfoChanged,opt,param);
+	    free(info[2*n+1]);
+	    info[2*n+1] = strdup(param);
 	    return 0;
 	  }
       }
Index: help/help_mp-en.h
===================================================================
--- help/help_mp-en.h	(revision 19410)
+++ help/help_mp-en.h	(working copy)
@@ -595,7 +595,7 @@
 #define MSGTR_OpeningAudioDemuxerFailed "Failed to open audio demuxer: %s\n"
 #define MSGTR_OpeningSubtitlesDemuxerFailed "Failed to open subtitle demuxer: %s\n"
 #define MSGTR_TVInputNotSeekable "TV input is not seekable! (Seeking will probably be for changing channels ;)\n"
-#define MSGTR_DemuxerInfoAlreadyPresent "Demuxer info %s already present!\n"
+#define MSGTR_DemuxerInfoChanged "Demuxer info %s changed to %s\n"
 #define MSGTR_ClipInfo "Clip info:\n"
 
 #define MSGTR_LeaveTelecineMode "\ndemux_mpg: 30000/1001fps NTSC content detected, switching framerate.\n"


More information about the MPlayer-dev-eng mailing list