diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2014-06-01 23:56:17 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-06-01 23:56:22 +0200 |
commit | 6b9cbc9a1164988b3517f4f160f7937e1644cdc3 (patch) | |
tree | 18f7678940d2fb685312ba02cfdd4101ece5ba69 /libavformat/rtmppkt.h | |
parent | 8225bf95bc3ffc9757879d2eb092cf3fa9d6b26f (diff) | |
parent | 3b18857ab301d2a0b3e86e9d85eed76f0798a29c (diff) | |
download | ffmpeg-6b9cbc9a1164988b3517f4f160f7937e1644cdc3.tar.gz |
Merge commit '3b18857ab301d2a0b3e86e9d85eed76f0798a29c'
* commit '3b18857ab301d2a0b3e86e9d85eed76f0798a29c':
rtmppkt: Add method to read an AMF string that is not prefixed by its type
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/rtmppkt.h')
-rw-r--r-- | libavformat/rtmppkt.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/libavformat/rtmppkt.h b/libavformat/rtmppkt.h index 0d98f60981..a082b45f98 100644 --- a/libavformat/rtmppkt.h +++ b/libavformat/rtmppkt.h @@ -278,6 +278,23 @@ int ff_amf_read_bool(GetByteContext *gbc, int *val); int ff_amf_read_number(GetByteContext *gbc, double *val); /** + * Get AMF string value. + * + * This function behaves the same as ff_amf_read_string except that + * it does not expect the AMF type prepended to the actual data. + * Appends a trailing null byte to output string in order to + * ease later parsing. + * + *@param[in,out] gbc GetByteContext initialized with AMF-formatted data + *@param[out] str read string + *@param[in] strsize buffer size available to store the read string + *@param[out] length read string length + *@return 0 on success or an AVERROR code on failure +*/ +int ff_amf_get_string(GetByteContext *bc, uint8_t *str, + int strsize, int *length); + +/** * Read AMF string value. * * Appends a trailing null byte to output string in order to |