Changeset 3672:af3bbd08fe6c in roaraudio


Ignore:
Timestamp:
04/06/10 04:07:46 (14 years ago)
Author:
phi
Branch:
default
Phase:
public
Message:

reject filter streams of wrong type (audio_info missmatch)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • roard/req.c

    r3630 r3672  
    194194 
    195195   break; 
     196  case ROAR_DIR_FILTER: 
     197    info        = &(ROAR_STREAM(s)->info); 
     198 
     199    if ( ROAR_STREAM(s)->pos_rel_id == -1 ) { 
     200     source_info = g_sa; 
     201    } else { 
     202     if ( streams_get(ROAR_STREAM(s)->pos_rel_id, (struct roar_stream_server **)&source_stream) == -1 ) { 
     203      streams_delete(stream); 
     204      return -1; 
     205     } 
     206     source_info = &(ROAR_STREAM(source_stream)->info); 
     207    } 
     208 
     209    if ( info->channels != source_info->channels || info->bits != source_info->bits || 
     210         info->codec    != source_info->codec    || info->rate != source_info->rate ) { 
     211     // the stream parameters don't match the one of the stream being filtered. 
     212     // -> delete and reject the stream. 
     213     streams_delete(stream); 
     214     return -1; 
     215    } 
     216   break; 
    196217 } 
    197218 
Note: See TracChangeset for help on using the changeset viewer.