winlin

fix bug of amf0 decode

# the listen ports, split by space.
listen 1935;
listen 1937;
# the default chunk size is 128, max is 65536,
# some client does not support chunk size change,
# however, most clients supports it and it can improve
... ...
... ... @@ -734,10 +734,12 @@ int srs_amf0_read_any(SrsStream* stream, SrsAmf0Any*& value)
return ret;
}
case RTMP_AMF0_Null: {
stream->skip(1);
value = new SrsAmf0Null();
return ret;
}
case RTMP_AMF0_Undefined: {
stream->skip(1);
value = new SrsAmf0Undefined();
return ret;
}
... ...
... ... @@ -538,7 +538,7 @@ int SrsProtocol::on_recv_message(SrsCommonMessage* msg)
srs_assert(msg != NULL);
// acknowledgement
if (skt->get_recv_bytes() - in_ack_size.acked_size > in_ack_size.ack_window_size) {
if (in_ack_size.ack_window_size > 0 && skt->get_recv_bytes() - in_ack_size.acked_size > in_ack_size.ack_window_size) {
if ((ret = response_acknowledgement_message()) != ERROR_SUCCESS) {
return ret;
}
... ...
... ... @@ -359,7 +359,7 @@ int SrsSource::on_audio(SrsCommonMessage* audio)
if (codec->audio_is_sequence_header(msg->payload, msg->size)) {
srs_freep(cache_sh_audio);
cache_sh_audio = msg->copy();
srs_trace("update audio sequence header success.");
srs_trace("update audio sequence header success. size=%d", msg->header.payload_length);
return ret;
}
... ... @@ -404,7 +404,7 @@ int SrsSource::on_video(SrsCommonMessage* video)
if (codec->video_is_sequence_header(msg->payload, msg->size)) {
srs_freep(cache_sh_video);
cache_sh_video = msg->copy();
srs_trace("update video sequence header success.");
srs_trace("update video sequence header success. size=%d", msg->header.payload_length);
return ret;
}
... ...