mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2026-02-20 01:40:28 -05:00
stream: return -EIO when doing get_time in != STREAMING
The stream should be streaming before the get_time call is meaningful. Various places in the code already check this an fall back to a default value, we just need to return an error here.
This commit is contained in:
parent
12fb9ab831
commit
11d5e071ec
4 changed files with 8 additions and 5 deletions
|
|
@ -151,7 +151,7 @@ static void test_create(void)
|
|||
/* check id, only when connected */
|
||||
spa_assert_se(pw_stream_get_node_id(stream) == SPA_ID_INVALID);
|
||||
|
||||
spa_assert_se(pw_stream_get_time_n(stream, &tm, sizeof(tm)) == 0);
|
||||
spa_assert_se(pw_stream_get_time_n(stream, &tm, sizeof(tm)) == -EIO);
|
||||
spa_assert_se(tm.now == 0);
|
||||
spa_assert_se(tm.rate.num == 0);
|
||||
spa_assert_se(tm.rate.denom == 0);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue