Index: roarclients/roarvorbis.c
===================================================================
--- roarclients/roarvorbis.c	(revision 861)
+++ roarclients/roarvorbis.c	(revision 1238)
@@ -153,4 +153,9 @@
    ptr++;
  }
+
+ *value      = 0;
+ meta.key[0] = 0;
+ meta.type   = ROAR_META_TYPE_NONE;
+ roar_stream_meta_set(con, s, ROAR_META_MODE_FINALIZE, &meta);
 
  return 0;
Index: roard/codecfilter.c
===================================================================
--- roard/codecfilter.c	(revision 1224)
+++ roard/codecfilter.c	(revision 1238)
@@ -88,5 +88,5 @@
  ROAR_CODECFILTER_READ,
 #endif
- cf_vorbis_open, cf_vorbis_close, NULL, cf_vorbis_write, cf_vorbis_read, NULL, codecfilter_delay_fulldyn, NULL},
+ cf_vorbis_open, cf_vorbis_close, NULL, cf_vorbis_write, cf_vorbis_read, NULL, codecfilter_delay_fulldyn, cf_vorbis_ctl},
 #else
 #ifndef ROAR_WITHOUT_CF_CMD
Index: roard/codecfilter_vorbis.c
===================================================================
--- roard/codecfilter_vorbis.c	(revision 1226)
+++ roard/codecfilter_vorbis.c	(revision 1238)
@@ -77,4 +77,5 @@
  self->encoding               = 0;
  self->encoder.v_base_quality = 0.3;
+ self->encoder.srn            = -1;
 #endif
 
@@ -180,20 +181,6 @@
   vorbis_analysis_wrote(&(self->encoder.vd), i);
 
-  while ( vorbis_analysis_blockout(&(self->encoder.vd), &(self->encoder.vb)) == 1 ) {
-   vorbis_analysis(&(self->encoder.vb), &(self->encoder.op));
-   vorbis_bitrate_addblock(&(self->encoder.vb));
-
-   while ( vorbis_bitrate_flushpacket(&(self->encoder.vd), &(self->encoder.op)) ) {
-    ogg_stream_packetin(&(self->encoder.os), &(self->encoder.op));
-
-    while( ogg_stream_pageout(&(self->encoder.os), &(self->encoder.og)) ) {
-     if (
-          stream_vio_s_write(self->stream, self->encoder.og.header, self->encoder.og.header_len) == -1 ||
-          stream_vio_s_write(self->stream, self->encoder.og.body,   self->encoder.og.body_len  ) == -1   ) {
-      return -1;
-     }
-    }
-   }
-  }
+  if ( cf_vorbis_encode_flushout(self) == -1 )
+   return -1;
  }
 
@@ -342,7 +329,17 @@
 int cf_vorbis_encode_start  (struct codecfilter_vorbis_inst * self) {
 #ifdef ROAR_HAVE_LIBVORBISENC
+ int srn = self->encoder.srn; // this value is allrady inited...
+ int len = 0;
+ int i;
+ int types[ROAR_META_MAX_PER_STREAM];
+ int sid = ROAR_STREAM(self->stream)->id;
+ char val[LIBROAR_BUFFER_MSGDATA];
+
+  val[LIBROAR_BUFFER_MSGDATA-1] = 0;
+
   memset(&(self->encoder), 0, sizeof(self->encoder));
 
   self->encoding = 1;
+  self->encoder.srn = srn + 1;;
 
   vorbis_info_init(&(self->encoder.vi));
@@ -350,4 +347,12 @@
   vorbis_comment_add_tag(&(self->encoder.vc), "SERVER", "RoarAudio");
   vorbis_comment_add_tag(&(self->encoder.vc), "ENCODER", "RoarAudio Vorbis codecfilter");
+
+  if ( (len = stream_meta_list(sid, types, ROAR_META_MAX_PER_STREAM)) != -1 ) {
+   for (i = 0; i < len; i++) {
+//int stream_meta_get     (int id, int type, char * name, char * val, size_t len);
+    if ( stream_meta_get(sid, types[i], NULL, val, LIBROAR_BUFFER_MSGDATA-1) == 0 )
+     vorbis_comment_add_tag(&(self->encoder.vc), roar_meta_strtype(types[i]), val);
+   }
+  }
 
   if( vorbis_encode_init_vbr(&(self->encoder.vi), (long) ROAR_STREAM(self->stream)->info.channels,
@@ -362,6 +367,10 @@
   vorbis_block_init(&(self->encoder.vd), &(self->encoder.vb));
 
+  ROAR_WARN("cf_vorbis_encode_start(*): srn=%i", self->encoder.srn);
                                      //  "RA"<<16 + PID<<8 + Stream ID
-  ogg_stream_init(&(self->encoder.os), 0x52410000 + ((getpid() & 0xff)<<8) + (ROAR_STREAM(self->stream)->id & 0xff));
+  ogg_stream_init(&(self->encoder.os),
+                   ((0x5241 + self->encoder.srn)<<16) +
+                   ((getpid() & 0xff           )<< 8) +
+                   ( sid      & 0xff               ));
  return 0;
 #else
@@ -373,4 +382,10 @@
 #ifdef ROAR_HAVE_LIBVORBISENC
  if ( self->encoding ) {
+  // try to flush up to an EOS page...
+  vorbis_analysis_buffer(&(self->encoder.vd), 2*ROAR_MAX_CHANNELS);
+  vorbis_analysis_wrote(&(self->encoder.vd), 0);
+  cf_vorbis_encode_flushout(self);
+
+  // clean up...
   ogg_stream_clear(&(self->encoder.os));
   vorbis_block_clear(&(self->encoder.vb));
@@ -386,4 +401,50 @@
 }
 
+int cf_vorbis_encode_flushout(struct codecfilter_vorbis_inst * self) {
+#ifdef ROAR_HAVE_LIBVORBISENC
+ while ( vorbis_analysis_blockout(&(self->encoder.vd), &(self->encoder.vb)) == 1 ) {
+  vorbis_analysis(&(self->encoder.vb), &(self->encoder.op));
+  vorbis_bitrate_addblock(&(self->encoder.vb));
+
+  while ( vorbis_bitrate_flushpacket(&(self->encoder.vd), &(self->encoder.op)) ) {
+   ogg_stream_packetin(&(self->encoder.os), &(self->encoder.op));
+
+   while( ogg_stream_pageout(&(self->encoder.os), &(self->encoder.og)) ) {
+    if (
+         stream_vio_s_write(self->stream, self->encoder.og.header, self->encoder.og.header_len) == -1 ||
+         stream_vio_s_write(self->stream, self->encoder.og.body,   self->encoder.og.body_len  ) == -1   ) {
+     return -1;
+    }
+   }
+  }
+ }
+
+ return 0;
+#else
+ return -1;
+#endif
+}
+
+int cf_vorbis_ctl(CODECFILTER_USERDATA_T   inst, int cmd, void * data) {
+ struct codecfilter_vorbis_inst * self = (struct codecfilter_vorbis_inst *) inst;
+
+ switch (cmd) {
+  case ROAR_CODECFILTER_CTL2CMD(ROAR_CODECFILTER_CTL_META_UPDATE):
+    ROAR_WARN("stoping stream...");
+    if ( cf_vorbis_encode_end(self) == -1 )
+     return -1;
+    ROAR_WARN("restarting stream...");
+    if ( cf_vorbis_encode_start(self) == -1 )
+     return -1;
+
+    return 0;
+   break;
+  default:
+    return -1;
+ }
+
+ return -1;
+}
+
 #endif
 //ll
Index: roard/include/codecfilter.h
===================================================================
--- roard/include/codecfilter.h	(revision 1224)
+++ roard/include/codecfilter.h	(revision 1238)
@@ -35,4 +35,15 @@
 #define ROAR_CODECFILTER_READ  1
 #define ROAR_CODECFILTER_WRITE 2
+
+
+#define ROAR_CODECFILTER_CTL_NOOP            ROAR_STREAM_CTL_COMP_CF|0x0000 /* noop... */
+#define ROAR_CODECFILTER_CTL_BASE            ROAR_STREAM_CTL_COMP_CF|0x0000 /* Base ops... */
+#define ROAR_CODECFILTER_CTL_META            ROAR_STREAM_CTL_COMP_CF|0x1000 /* Meta data things... */
+
+#define ROAR_CODECFILTER_CTL_UPDATE          0x0001
+
+#define ROAR_CODECFILTER_CTL_META_UPDATE     ROAR_CODECFILTER_CTL_META|ROAR_CODECFILTER_CTL_UPDATE
+
+#define ROAR_CODECFILTER_CTL2CMD(x)          ((x) & (~ROAR_STREAM_CTL_COMP_CF))
 
 struct roar_codecfilter {
Index: roard/include/codecfilter_vorbis.h
===================================================================
--- roard/include/codecfilter_vorbis.h	(revision 1226)
+++ roard/include/codecfilter_vorbis.h	(revision 1238)
@@ -48,4 +48,5 @@
  int encoding;
  struct {
+  int srn;
   float v_base_quality;
   ogg_stream_state os;
@@ -72,7 +73,10 @@
 int cf_vorbis_read(CODECFILTER_USERDATA_T   inst, char * buf, int len);
 
-int cf_vorbis_update_stream (struct codecfilter_vorbis_inst * self);
-int cf_vorbis_encode_start  (struct codecfilter_vorbis_inst * self);
-int cf_vorbis_encode_end    (struct codecfilter_vorbis_inst * self);
+int cf_vorbis_ctl(CODECFILTER_USERDATA_T   inst, int cmd, void * data);
+
+int cf_vorbis_update_stream  (struct codecfilter_vorbis_inst * self);
+int cf_vorbis_encode_start   (struct codecfilter_vorbis_inst * self);
+int cf_vorbis_encode_end     (struct codecfilter_vorbis_inst * self);
+int cf_vorbis_encode_flushout(struct codecfilter_vorbis_inst * self);
 
 #endif
Index: roard/meta.c
===================================================================
--- roard/meta.c	(revision 1040)
+++ roard/meta.c	(revision 1238)
@@ -223,4 +223,7 @@
    }
   }
+
+  // ask the codec filter to update meta data:
+  streams_ctl(co, ROAR_CODECFILTER_CTL_META_UPDATE, NULL); // ignore errors...
  }
 
Index: roard/streams.c
===================================================================
--- roard/streams.c	(revision 1231)
+++ roard/streams.c	(revision 1238)
@@ -382,4 +382,6 @@
  cmd &= ~comp;
 
+ ROAR_WARN("streams_ctl(id=%i, cmd=?, data=%p): comp=0x%.8x, cmd=0x%.4x", id, data, comp, cmd);
+
  switch (comp) {
   case ROAR_STREAM_CTL_COMP_BASE:
