mirror of https://github.com/mpv-player/mpv
options/m_option: support duplicating MPV_FORMAT_BYTE_ARRAY nodes
This commit is contained in:
parent
3b2b47e32a
commit
0b3c37bc43
|
@ -3774,6 +3774,16 @@ static void dup_node(void *ta_parent, struct mpv_node *node)
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
case MPV_FORMAT_BYTE_ARRAY: {
|
||||||
|
struct mpv_byte_array *old = node->u.ba;
|
||||||
|
struct mpv_byte_array *new = talloc_zero(ta_parent, struct mpv_byte_array);
|
||||||
|
node->u.ba = new;
|
||||||
|
if (old->size > 0) {
|
||||||
|
*new = *old;
|
||||||
|
new->data = talloc_memdup(new, old->data, old->size);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
case MPV_FORMAT_NONE:
|
case MPV_FORMAT_NONE:
|
||||||
case MPV_FORMAT_FLAG:
|
case MPV_FORMAT_FLAG:
|
||||||
case MPV_FORMAT_INT64:
|
case MPV_FORMAT_INT64:
|
||||||
|
|
Loading…
Reference in New Issue