提交 50773499 编写于 作者: J jp9000

libobs: Create referenced parsed AVC encoder packet

When creating an encoder packet via obs_parse_avc_packet, make sure to
create a proper referenced encoder packet
上级 cd7bc323
......@@ -132,15 +132,17 @@ void obs_parse_avc_packet(struct encoder_packet *avc_packet,
{
struct array_output_data output;
struct serializer s;
long ref = 1;
array_output_serializer_init(&s, &output);
*avc_packet = *src;
serialize(&s, &ref, sizeof(ref));
serialize_avc_data(&s, src->data, src->size, &avc_packet->keyframe,
&avc_packet->priority);
avc_packet->data = output.bytes.array;
avc_packet->size = output.bytes.num;
avc_packet->data = output.bytes.array + sizeof(ref);
avc_packet->size = output.bytes.num + sizeof(ref);
avc_packet->drop_priority = get_drop_priority(avc_packet->priority);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册