[Redbutton-devel] SF.net SVN: redbutton: [495] redbutton-browser/trunk/MHEGStreamPlayer.c
Brought to you by:
skilvington
|
From: <ski...@us...> - 2008-06-18 16:17:38
|
Revision: 495
http://redbutton.svn.sourceforge.net/redbutton/?rev=495&view=rev
Author: skilvington
Date: 2008-06-18 09:17:32 -0700 (Wed, 18 Jun 2008)
Log Message:
-----------
reset the service ID and a/v streams when all the MHEGStreamPlayer user have gone
Modified Paths:
--------------
redbutton-browser/trunk/MHEGStreamPlayer.c
Modified: redbutton-browser/trunk/MHEGStreamPlayer.c
===================================================================
--- redbutton-browser/trunk/MHEGStreamPlayer.c 2008-06-17 16:05:20 UTC (rev 494)
+++ redbutton-browser/trunk/MHEGStreamPlayer.c 2008-06-18 16:17:32 UTC (rev 495)
@@ -188,6 +188,17 @@
player.nusers --;
+ /* reset the service ID and streams if all the users have gone */
+ if(player.nusers == 0)
+ {
+ player.service_id = -1;
+ player.have_video = false;
+ player.video = NULL;
+ player.have_audio = false;
+ player.audio = NULL;
+ player.audio_codec = NULL;
+ }
+
verbose("MHEGStreamPlayer: %u users", player.nusers);
*p = NULL;
@@ -217,6 +228,10 @@
if(p != &player)
fatal("MHEGStreamPlayer_setServiceID: p=%p, &player=%p", p, &player);
+ /* assert */
+ if(p->playing && p->service_id != id)
+ fatal("MHEGStreamPlayer_setServiceID: trying to change service ID while playing");
+
p->service_id = id;
return;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|