mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-09 13:30:06 -05:00
example: handle connect error
This commit is contained in:
parent
181c2de2ee
commit
2070ad37df
1 changed files with 4 additions and 1 deletions
|
|
@ -135,7 +135,10 @@ int main(int argc, char *argv[])
|
||||||
|
|
||||||
/* Now connect this filter. We ask that our process function is
|
/* Now connect this filter. We ask that our process function is
|
||||||
* called in a realtime thread. */
|
* called in a realtime thread. */
|
||||||
pw_filter_connect(data.filter, PW_FILTER_FLAG_RT_PROCESS, NULL, 0);
|
if (pw_filter_connect(data.filter, PW_FILTER_FLAG_RT_PROCESS, NULL, 0) < 0) {
|
||||||
|
fprintf(stderr, "can't connect\n");
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
/* and wait while we let things run */
|
/* and wait while we let things run */
|
||||||
pw_main_loop_run(data.loop);
|
pw_main_loop_run(data.loop);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue