Commit f653f2c9 authored by zhujiashun's avatar zhujiashun

change error log of checking validation of frame_type and codec to warning

parent 6e68e844
......@@ -2169,12 +2169,10 @@ bool RtmpChunkStream::OnVideoMessage(
msg.frame_type = (FlvVideoFrameType)((first_byte >> 4) & 0xF);
msg.codec = (FlvVideoCodec)(first_byte & 0xF);
if (!is_video_frame_type_valid(msg.frame_type)) {
RTMP_ERROR(socket, mh) << "Invalid frame_type=" << (int)msg.frame_type;
return false;
RTMP_WARNING(socket, mh) << "Invalid frame_type=" << (int)msg.frame_type;
}
if (!is_video_codec_valid(msg.codec)) {
RTMP_ERROR(socket, mh) << "Invalid codec=" << (int)msg.codec;
return false;
RTMP_WARNING(socket, mh) << "Invalid codec=" << (int)msg.codec;
}
msg_body->swap(msg.data);
......
......@@ -69,7 +69,6 @@ inline bool is_video_codec_valid(FlvVideoCodec id) {
return (id >= FLV_VIDEO_JPEG && id <= FLV_VIDEO_HEVC);
}
// Get literal form of the message type.
const char* messagetype2str(RtmpMessageType);
const char* messagetype2str(uint8_t);
......
......@@ -1363,14 +1363,10 @@ int RtmpStreamBase::SendVideoMessage(const RtmpVideoMessage& msg) {
return -1;
}
if (!policy::is_video_frame_type_valid(msg.frame_type)) {
LOG(ERROR) << "Invalid frame_type=" << (int)msg.frame_type;
errno = EINVAL;
return -1;
LOG(WARNING) << "Invalid frame_type=" << (int)msg.frame_type;
}
if (!policy::is_video_codec_valid(msg.codec)) {
LOG(ERROR) << "Invalid codec=" << (int)msg.codec;
errno = EINVAL;
return -1;
LOG(WARNING) << "Invalid codec=" << (int)msg.codec;
}
if (_paused) {
errno = EPERM;
......@@ -1400,9 +1396,7 @@ int RtmpStreamBase::SendAVCMessage(const RtmpAVCMessage& msg) {
return -1;
}
if (!policy::is_video_frame_type_valid(msg.frame_type)) {
LOG(ERROR) << "Invalid frame_type=" << (int)msg.frame_type;
errno = EINVAL;
return -1;
LOG(WARNING) << "Invalid frame_type=" << (int)msg.frame_type;
}
if (_paused) {
errno = EPERM;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment