[polypaudio-commits] r782 - /trunk/src/polypcore/tagstruct.c

svnmailer-noreply at 0pointer.de svnmailer-noreply at 0pointer.de
Sun Apr 23 12:42:59 PDT 2006


Author: lennart
Date: Sun Apr 23 21:42:58 2006
New Revision: 782

URL: http://0pointer.de/cgi-bin/viewcvs.cgi?rev=782&root=polypaudio&view=rev
Log:
allow recieving of invalid channel maps, volumes and sample specs. This makes handling of uninitialized data better, e.g. when sending info about lazy-load sample chache entries, where the channel mapping and sample spec is still unknown.

Modified:
    trunk/src/polypcore/tagstruct.c

Modified: trunk/src/polypcore/tagstruct.c
URL: http://0pointer.de/cgi-bin/viewcvs.cgi/trunk/src/polypcore/tagstruct.c?rev=782&root=polypaudio&r1=781&r2=782&view=diff
==============================================================================
--- trunk/src/polypcore/tagstruct.c (original)
+++ trunk/src/polypcore/tagstruct.c Sun Apr 23 21:42:58 2006
@@ -311,9 +311,6 @@
     memcpy(&ss->rate, t->data+t->rindex+3, 4);
     ss->rate = ntohl(ss->rate);
 
-    if (!pa_sample_spec_valid(ss))
-        return -1;
-    
     t->rindex += 7;
     return 0;
 }
@@ -379,7 +376,6 @@
     tv->tv_usec = ntohl(tv->tv_usec);
     t->rindex += 9;
     return 0;
-    
 }
 
 int pa_tagstruct_get_usec(pa_tagstruct*t, pa_usec_t *u) {
@@ -457,9 +453,6 @@
     for (i = 0; i < map->channels; i ++)
         map->map[i] = (int8_t) t->data[t->rindex + 2 + i];
 
-    if (!pa_channel_map_valid(map))
-        return -1;
-    
     t->rindex += 2 + map->channels;
     return 0;
 }
@@ -488,9 +481,6 @@
         cvolume->values[i] = (pa_volume_t) ntohl(vol);
     }
 
-    if (!pa_cvolume_valid(cvolume))
-        return -1;
-    
     t->rindex += 2 + cvolume->channels * sizeof(pa_volume_t);
     return 0;
 }




More information about the pulseaudio-commits mailing list