Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
B
brpc
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
brpc
Commits
e3bd4a0c
Commit
e3bd4a0c
authored
7 years ago
by
zhujiashun
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of github.com:brpc/brpc into cmake_support
parents
0d9bad77
f653f2c9
No related merge requests found
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
7 additions
and
16 deletions
+7
-16
config_brpc.sh
config_brpc.sh
+2
-2
rtmp_protocol.cpp
src/brpc/policy/rtmp_protocol.cpp
+2
-4
rtmp_protocol.h
src/brpc/policy/rtmp_protocol.h
+0
-1
rtmp.cpp
src/brpc/rtmp.cpp
+3
-9
No files found.
config_brpc.sh
View file @
e3bd4a0c
...
...
@@ -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
()
{
...
...
This diff is collapsed.
Click to expand it.
src/brpc/policy/rtmp_protocol.cpp
View file @
e3bd4a0c
...
...
@@ -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
);
...
...
This diff is collapsed.
Click to expand it.
src/brpc/policy/rtmp_protocol.h
View file @
e3bd4a0c
...
...
@@ -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
);
...
...
This diff is collapsed.
Click to expand it.
src/brpc/rtmp.cpp
View file @
e3bd4a0c
...
...
@@ -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
;
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment