Changeset 2609:be3a02306b24 in roaraudio


Ignore:
Timestamp:
09/11/09 15:32:12 (15 years ago)
Author:
phi
Branch:
default
Phase:
public
Message:

more debug lions, delete parent streams only in case there is one set

File:
1 edited

Legend:

Unmodified
Added
Removed
  • roard/streams.c

    r2606 r2609  
    135135 int no_vio_close = 0; 
    136136 int i; 
     137 int client; 
    137138 
    138139 if ( (s = g_streams[id]) == NULL ) 
     
    155156    default: 
    156157      if ( streams_get_flag(i, ROAR_FLAG_VIRTUAL) == 1 ) { 
    157        if ( i != id ) 
     158       if ( i != id ) { 
     159        ROAR_DBG("streams_delete(id=%i): Deleting virtual child stream %i", id, i); 
    158160        streams_delete(i); 
     161       } 
    159162      } else { 
    160163       ROAR_STREAM(g_streams[i])->pos_rel_id = -1; 
     
    169172 if ( streams_get_flag(id, ROAR_FLAG_VIRTUAL) == 1 ) { 
    170173  // we un-group the stream here to avoid a client deleting the parent deleting the client deleting ... 
    171   i = ROAR_STREAM(s)->pos_rel_id; 
    172   ROAR_STREAM(s)->pos_rel_id = -1; 
    173   ROAR_DBG("streams_delete(id=%i): Stream has flag virtual, notifying parent stream %i", id, i); 
    174   streams_ctl(i, ROAR_CODECFILTER_CTL_VIRTUAL_DELETE, &id); 
    175   ROAR_STREAM(s)->pos_rel_id = i; 
     174  i      = ROAR_STREAM(s)->pos_rel_id; 
     175  if ( i != -1 ) { 
     176   ROAR_STREAM(s)->pos_rel_id = -1; 
     177   client = streams_get_client(id); 
     178   streams_set_client(id, -1); 
     179   ROAR_DBG("streams_delete(id=%i): Stream has flag virtual, notifying parent stream %i", id, i); 
     180   streams_ctl(i, ROAR_CODECFILTER_CTL_VIRTUAL_DELETE, &id); 
     181   ROAR_DBG("streams_delete(id=%i): Notify send to stream %i", id, i); 
     182   streams_set_client(id, client); 
     183   ROAR_STREAM(s)->pos_rel_id = i; 
     184  } 
    176185 } 
    177186 
Note: See TracChangeset for help on using the changeset viewer.