mirror of
https://github.com/mpv-player/mpv.git
synced 2025-12-28 05:33:14 +00:00
vo_libmpv: don't steal pointer provided by the API user
It won't be TA allocated and would fail on header check. Also documentation doesn't mention that ownership is transfered to mpv, so it is unexpected. This will cause existing clients of this API leak this memory, but I doubt anyone really used it in this broken state. Fixes: #14633
This commit is contained in:
@@ -107,7 +107,7 @@ static int set_parameter(struct render_backend *ctx, mpv_render_param param)
|
||||
switch (param.type) {
|
||||
case MPV_RENDER_PARAM_ICC_PROFILE: {
|
||||
mpv_byte_array *data = param.data;
|
||||
gl_video_set_icc_profile(p->renderer, (bstr){data->data, data->size});
|
||||
gl_video_set_icc_profile(p->renderer, bstrdup(NULL, (bstr){data->data, data->size}));
|
||||
return 0;
|
||||
}
|
||||
case MPV_RENDER_PARAM_AMBIENT_LIGHT: {
|
||||
|
||||
Reference in New Issue
Block a user