mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-12-19 08:57:00 -05:00
introduce pa_xmalloc() and friends
implement module auto loading git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@103 fefdeb5f-60dc-0310-8127-8f9354f1896f
This commit is contained in:
parent
24291aff27
commit
46091a9237
61 changed files with 700 additions and 631 deletions
|
|
@ -30,6 +30,7 @@
|
|||
|
||||
#include "sink-input.h"
|
||||
#include "sample-util.h"
|
||||
#include "xmalloc.h"
|
||||
|
||||
#define CONVERT_BUFFER_LENGTH 4096
|
||||
|
||||
|
|
@ -44,9 +45,8 @@ struct pa_sink_input* pa_sink_input_new(struct pa_sink *s, const char *name, con
|
|||
if (!(resampler = pa_resampler_new(spec, &s->sample_spec)))
|
||||
return NULL;
|
||||
|
||||
i = malloc(sizeof(struct pa_sink_input));
|
||||
assert(i);
|
||||
i->name = name ? strdup(name) : NULL;
|
||||
i = pa_xmalloc(sizeof(struct pa_sink_input));
|
||||
i->name = pa_xstrdup(name);
|
||||
i->client = NULL;
|
||||
i->owner = NULL;
|
||||
i->sink = s;
|
||||
|
|
@ -88,8 +88,8 @@ void pa_sink_input_free(struct pa_sink_input* i) {
|
|||
if (i->resampler)
|
||||
pa_resampler_free(i->resampler);
|
||||
|
||||
free(i->name);
|
||||
free(i);
|
||||
pa_xfree(i->name);
|
||||
pa_xfree(i);
|
||||
}
|
||||
|
||||
void pa_sink_input_kill(struct pa_sink_input*i) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue