diff options
Diffstat (limited to 'libavformat/rtmppkt.c')
-rw-r--r-- | libavformat/rtmppkt.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/libavformat/rtmppkt.c b/libavformat/rtmppkt.c index f69ce82c66..aed188dcc7 100644 --- a/libavformat/rtmppkt.c +++ b/libavformat/rtmppkt.c @@ -47,6 +47,19 @@ void ff_amf_write_string(uint8_t **dst, const char *str) bytestream_put_buffer(dst, str, strlen(str)); } +void ff_amf_write_string2(uint8_t **dst, const char *str1, const char *str2) +{ + int len1 = 0, len2 = 0; + if (str1) + len1 = strlen(str1); + if (str2) + len2 = strlen(str2); + bytestream_put_byte(dst, AMF_DATA_TYPE_STRING); + bytestream_put_be16(dst, len1 + len2); + bytestream_put_buffer(dst, str1, len1); + bytestream_put_buffer(dst, str2, len2); +} + void ff_amf_write_null(uint8_t **dst) { bytestream_put_byte(dst, AMF_DATA_TYPE_NULL); |