pw-cat: handle stream error

Exit when the stream is in error

See #430
This commit is contained in:
Wim Taymans 2020-12-01 09:38:56 +01:00
parent 8b048279f1
commit 97ec1ce209

View file

@ -779,6 +779,12 @@ on_state_changed(void *userdata, enum pw_stream_state old,
printf("stream node %"PRIu32"\n", printf("stream node %"PRIu32"\n",
pw_stream_get_node_id(data->stream)); pw_stream_get_node_id(data->stream));
} }
if (state == PW_STREAM_STATE_ERROR) {
printf("stream node %"PRIu32" error: %s\n",
pw_stream_get_node_id(data->stream),
error);
pw_main_loop_quit(data->loop);
}
} }
static void static void