mirror of
https://github.com/obsproject/obs-studio.git
synced 2024-07-14 23:34:08 +00:00
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
This commit is contained in:
parent
cd7bc32388
commit
50773499a1
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue