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 ...@@ -64,7 +64,7 @@ if [ -z "$HDRS_IN" ] || [ -z "$LIBS_IN" ]; then
fi fi
find_dir_of_lib() { 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 if [ ! -z "$lib" ]; then
dirname $lib dirname $lib
fi fi
...@@ -84,7 +84,7 @@ find_bin() { ...@@ -84,7 +84,7 @@ find_bin() {
if [ ! -z "$TARGET_BIN" ]; then if [ ! -z "$TARGET_BIN" ]; then
$ECHO $TARGET_BIN $ECHO $TARGET_BIN
else else
find ${LIBS_IN} -name "$1" | head -n1 find ${LIBS_IN} -name "$1" 2>/dev/null | head -n1
fi fi
} }
find_bin_or_die() { find_bin_or_die() {
......
...@@ -2169,12 +2169,10 @@ bool RtmpChunkStream::OnVideoMessage( ...@@ -2169,12 +2169,10 @@ bool RtmpChunkStream::OnVideoMessage(
msg.frame_type = (FlvVideoFrameType)((first_byte >> 4) & 0xF); msg.frame_type = (FlvVideoFrameType)((first_byte >> 4) & 0xF);
msg.codec = (FlvVideoCodec)(first_byte & 0xF); msg.codec = (FlvVideoCodec)(first_byte & 0xF);
if (!is_video_frame_type_valid(msg.frame_type)) { if (!is_video_frame_type_valid(msg.frame_type)) {
RTMP_ERROR(socket, mh) << "Invalid frame_type=" << (int)msg.frame_type; RTMP_WARNING(socket, mh) << "Invalid frame_type=" << (int)msg.frame_type;
return false;
} }
if (!is_video_codec_valid(msg.codec)) { if (!is_video_codec_valid(msg.codec)) {
RTMP_ERROR(socket, mh) << "Invalid codec=" << (int)msg.codec; RTMP_WARNING(socket, mh) << "Invalid codec=" << (int)msg.codec;
return false;
} }
msg_body->swap(msg.data); msg_body->swap(msg.data);
......
...@@ -69,7 +69,6 @@ inline bool is_video_codec_valid(FlvVideoCodec id) { ...@@ -69,7 +69,6 @@ inline bool is_video_codec_valid(FlvVideoCodec id) {
return (id >= FLV_VIDEO_JPEG && id <= FLV_VIDEO_HEVC); return (id >= FLV_VIDEO_JPEG && id <= FLV_VIDEO_HEVC);
} }
// Get literal form of the message type. // Get literal form of the message type.
const char* messagetype2str(RtmpMessageType); const char* messagetype2str(RtmpMessageType);
const char* messagetype2str(uint8_t); const char* messagetype2str(uint8_t);
......
...@@ -1363,14 +1363,10 @@ int RtmpStreamBase::SendVideoMessage(const RtmpVideoMessage& msg) { ...@@ -1363,14 +1363,10 @@ int RtmpStreamBase::SendVideoMessage(const RtmpVideoMessage& msg) {
return -1; return -1;
} }
if (!policy::is_video_frame_type_valid(msg.frame_type)) { if (!policy::is_video_frame_type_valid(msg.frame_type)) {
LOG(ERROR) << "Invalid frame_type=" << (int)msg.frame_type; LOG(WARNING) << "Invalid frame_type=" << (int)msg.frame_type;
errno = EINVAL;
return -1;
} }
if (!policy::is_video_codec_valid(msg.codec)) { if (!policy::is_video_codec_valid(msg.codec)) {
LOG(ERROR) << "Invalid codec=" << (int)msg.codec; LOG(WARNING) << "Invalid codec=" << (int)msg.codec;
errno = EINVAL;
return -1;
} }
if (_paused) { if (_paused) {
errno = EPERM; errno = EPERM;
...@@ -1400,9 +1396,7 @@ int RtmpStreamBase::SendAVCMessage(const RtmpAVCMessage& msg) { ...@@ -1400,9 +1396,7 @@ int RtmpStreamBase::SendAVCMessage(const RtmpAVCMessage& msg) {
return -1; return -1;
} }
if (!policy::is_video_frame_type_valid(msg.frame_type)) { if (!policy::is_video_frame_type_valid(msg.frame_type)) {
LOG(ERROR) << "Invalid frame_type=" << (int)msg.frame_type; LOG(WARNING) << "Invalid frame_type=" << (int)msg.frame_type;
errno = EINVAL;
return -1;
} }
if (_paused) { if (_paused) {
errno = EPERM; 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