mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-06 13:29:56 -05:00
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.
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@782 fefdeb5f-60dc-0310-8127-8f9354f1896f
This commit is contained in:
parent
834506318d
commit
b4ac6d05d2
1 changed files with 0 additions and 10 deletions
|
|
@ -311,9 +311,6 @@ int pa_tagstruct_get_sample_spec(pa_tagstruct *t, pa_sample_spec *ss) {
|
|||
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 @@ int pa_tagstruct_get_timeval(pa_tagstruct*t, struct timeval *tv) {
|
|||
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 @@ int pa_tagstruct_get_channel_map(pa_tagstruct *t, pa_channel_map *map) {
|
|||
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 @@ int pa_tagstruct_get_cvolume(pa_tagstruct *t, pa_cvolume *cvolume) {
|
|||
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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue