Commit e3bd4a0c authored by zhujiashun's avatar zhujiashun

Merge branch 'master' of github.com:brpc/brpc into cmake_support

parents 0d9bad77 f653f2c9
......@@ -64,7 +64,7 @@ if [ -z "$HDRS_IN" ] || [ -z "$LIBS_IN" ]; then
fi
find_dir_of_lib() {
local lib=$(find ${LIBS_IN} -name "lib${1}.a" -o -name "lib${1}.$SO" | head -n1)
local lib=$(find ${LIBS_IN} -name "lib${1}.a" -o -name "lib${1}.$SO" 2>/dev/null | head -n1)
if [ ! -z "$lib" ]; then
dirname $lib
fi
......@@ -84,7 +84,7 @@ find_bin() {
if [ ! -z "$TARGET_BIN" ]; then
$ECHO $TARGET_BIN
else
find ${LIBS_IN} -name "$1" | head -n1
find ${LIBS_IN} -name "$1" 2>/dev/null | head -n1
fi
}
find_bin_or_die() {
......
......@@ -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