obs-outputs: Change FLV tag size according to v10 spec

This commit is contained in:
Ruwen Hahn 2023-05-18 13:47:03 +02:00 committed by Lain
parent 7373f326f3
commit bdd7d9cf53

View file

@ -212,8 +212,15 @@ static inline void write_previous_tag_size_without_header(struct serializer *s,
uint32_t header_size)
{
assert(serializer_get_pos(s) >= header_size);
/* write tag size (starting byte doesn't count) */
s_wb32(s, (uint32_t)serializer_get_pos(s) - header_size - 1);
assert(serializer_get_pos(s) >= 11);
/*
* From FLV file format specification version 10:
* Size of previous [current] tag, including its header.
* For FLV version 1 this value is 11 plus the DataSize of
* the previous [current] tag.
*/
s_wb32(s, (uint32_t)serializer_get_pos(s) - header_size);
}
static inline void write_previous_tag_size(struct serializer *s)