rtmp: remove C_AVal from C_AMF3ReadString

Note that this function is not used.
This commit is contained in:
Dan Kortschak 2018-09-06 15:57:06 +09:30
parent f005c31b44
commit ed40f36ffe
1 changed files with 3 additions and 5 deletions

View File

@ -424,7 +424,7 @@ func C_AMF3ReadInteger(data *byte, valp *int32) int32 {
// int AMF3ReadString(const char *data, AVal *str); // int AMF3ReadString(const char *data, AVal *str);
// amf.c +466 // amf.c +466
func C_AMF3ReadString(data *byte, str *C_AVal) int32 { func C_AMF3ReadString(data *byte, str *string) int32 {
var ref int32 var ref int32
// assert elided - we will get a panic if it's nil. // 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, // RTMP_Log(RTMP_LOGDEBUG,
// "%s, string reference, index: %d, not supported, ignoring!", // "%s, string reference, index: %d, not supported, ignoring!",
// __FUNCTION__, refIndex); // __FUNCTION__, refIndex);
str.av_val = nil *str = ""
str.av_len = 0
return len return len
} else { } else {
nSize := (ref >> 1) nSize := (ref >> 1)
str.av_val = data *str = string((*[_Gi]byte)(unsafe.Pointer(data))[:nSize])
str.av_len = int32(nSize)
return len + nSize return len + nSize
} }
return len return len