diff --git a/src/examples/video-play.c b/src/examples/video-play.c index 2b4e85552..9ced483ff 100644 --- a/src/examples/video-play.c +++ b/src/examples/video-play.c @@ -231,7 +231,7 @@ on_stream_format_changed(void *_data, const struct spa_pod *format) struct pw_type *t = data->t; uint8_t params_buffer[1024]; struct spa_pod_builder b = SPA_POD_BUILDER_INIT(params_buffer, sizeof(params_buffer)); - struct spa_pod *params[2]; + const struct spa_pod *params[2]; Uint32 sdl_format; void *d; diff --git a/src/examples/video-src.c b/src/examples/video-src.c index 829666bd1..d272c7254 100644 --- a/src/examples/video-src.c +++ b/src/examples/video-src.c @@ -167,7 +167,7 @@ on_stream_format_changed(void *_data, const struct spa_pod *format) struct pw_type *t = data->t; uint8_t params_buffer[1024]; struct spa_pod_builder b = SPA_POD_BUILDER_INIT(params_buffer, sizeof(params_buffer)); - struct spa_pod *params[2]; + const struct spa_pod *params[2]; if (format == NULL) { pw_stream_finish_format(stream, 0, NULL, 0); diff --git a/src/pipewire/stream.c b/src/pipewire/stream.c index a39a5d8f3..dc97cd472 100644 --- a/src/pipewire/stream.c +++ b/src/pipewire/stream.c @@ -1045,7 +1045,7 @@ set_init_params(struct pw_stream *stream, impl->n_init_params = n_init_params; } -static void set_params(struct pw_stream *stream, int n_params, struct spa_pod **params) +static void set_params(struct pw_stream *stream, int n_params, const struct spa_pod **params) { struct stream *impl = SPA_CONTAINER_OF(stream, struct stream, this); int i; @@ -1193,7 +1193,7 @@ int pw_stream_disconnect(struct pw_stream *stream) void pw_stream_finish_format(struct pw_stream *stream, int res, - struct spa_pod **params, + const struct spa_pod **params, uint32_t n_params) { struct stream *impl = SPA_CONTAINER_OF(stream, struct stream, this); diff --git a/src/pipewire/stream.h b/src/pipewire/stream.h index 0aae2ecbb..44588c9e5 100644 --- a/src/pipewire/stream.h +++ b/src/pipewire/stream.h @@ -289,7 +289,7 @@ int pw_stream_disconnect(struct pw_stream *stream); void pw_stream_finish_format(struct pw_stream *stream, /**< a \ref pw_stream */ int res, /**< a result code */ - struct spa_pod **params, /**< an array of params. The params should + const struct spa_pod **params, /**< an array of params. The params should * ideally contain parameters for doing * buffer allocation. */ uint32_t n_params /**< number of elements in \a params */);