mirror of https://bitbucket.org/ausocean/av.git
rtmp: remove C_AVal from C_AMF3ReadString
Note that this function is not used.
This commit is contained in:
parent
f005c31b44
commit
ed40f36ffe
|
@ -424,7 +424,7 @@ func C_AMF3ReadInteger(data *byte, valp *int32) int32 {
|
|||
|
||||
// int AMF3ReadString(const char *data, AVal *str);
|
||||
// amf.c +466
|
||||
func C_AMF3ReadString(data *byte, str *C_AVal) int32 {
|
||||
func C_AMF3ReadString(data *byte, str *string) int32 {
|
||||
var ref int32
|
||||
// assert elided - we will get a panic if it's nil.
|
||||
|
||||
|
@ -438,13 +438,11 @@ func C_AMF3ReadString(data *byte, str *C_AVal) int32 {
|
|||
// RTMP_Log(RTMP_LOGDEBUG,
|
||||
// "%s, string reference, index: %d, not supported, ignoring!",
|
||||
// __FUNCTION__, refIndex);
|
||||
str.av_val = nil
|
||||
str.av_len = 0
|
||||
*str = ""
|
||||
return len
|
||||
} else {
|
||||
nSize := (ref >> 1)
|
||||
str.av_val = data
|
||||
str.av_len = int32(nSize)
|
||||
*str = string((*[_Gi]byte)(unsafe.Pointer(data))[:nSize])
|
||||
return len + nSize
|
||||
}
|
||||
return len
|
||||
|
|
Loading…
Reference in New Issue