Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
F
ffmpeg.wasm-core
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
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Linshizhi
ffmpeg.wasm-core
Commits
fb7e7808
Commit
fb7e7808
authored
Aug 11, 2012
by
Samuel Pitoiset
Committed by
Martin Storsjö
Aug 14, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rtmp: Gracefully ignore _checkbw errors by tracking them
Signed-off-by:
Martin Storsjö
<
martin@martin.st
>
parent
8b6a5a79
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
4 deletions
+16
-4
rtmpproto.c
libavformat/rtmpproto.c
+16
-4
No files found.
libavformat/rtmpproto.c
View file @
fb7e7808
...
...
@@ -629,7 +629,7 @@ static int gen_check_bw(URLContext *s, RTMPContext *rt)
ff_amf_write_number
(
&
p
,
++
rt
->
nb_invokes
);
ff_amf_write_null
(
&
p
);
return
rtmp_send_packet
(
rt
,
&
pkt
,
0
);
return
rtmp_send_packet
(
rt
,
&
pkt
,
1
);
}
/**
...
...
@@ -1055,15 +1055,27 @@ static int handle_server_bw(URLContext *s, RTMPPacket *pkt)
static
int
handle_invoke_error
(
URLContext
*
s
,
RTMPPacket
*
pkt
)
{
const
uint8_t
*
data_end
=
pkt
->
data
+
pkt
->
data_size
;
char
*
tracked_method
=
NULL
;
int
level
=
AV_LOG_ERROR
;
uint8_t
tmpstr
[
256
];
int
ret
;
if
((
ret
=
find_tracked_method
(
s
,
pkt
,
9
,
&
tracked_method
))
<
0
)
return
ret
;
if
(
!
ff_amf_get_field_value
(
pkt
->
data
+
9
,
data_end
,
"description"
,
tmpstr
,
sizeof
(
tmpstr
)))
{
av_log
(
s
,
AV_LOG_ERROR
,
"Server error: %s
\n
"
,
tmpstr
);
return
-
1
;
if
(
tracked_method
&&
!
strcmp
(
tracked_method
,
"_checkbw"
))
{
/* Ignore _checkbw errors. */
level
=
AV_LOG_WARNING
;
ret
=
0
;
}
else
ret
=
-
1
;
av_log
(
s
,
level
,
"Server error: %s
\n
"
,
tmpstr
);
}
return
0
;
av_free
(
tracked_method
);
return
ret
;
}
static
int
handle_invoke_result
(
URLContext
*
s
,
RTMPPacket
*
pkt
)
...
...
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