mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-08 13:22:53 +02:00
rtmpproto: Print the error code string if there's no description
On (certain streams/setups at least on) Red5, the description string actually is present, but empty. Therefore, first try loading the description, but if not found or empty, load the code string instead. The code string is quite understandable in most cases anyway (like "NetStream.Play.StreamNotFound"). Signed-off-by: Martin Storsjö <martin@martin.st>
This commit is contained in:
parent
b2bed9325d
commit
a6b361325f
@ -2018,8 +2018,12 @@ static int handle_invoke_status(URLContext *s, RTMPPacket *pkt)
|
||||
|
||||
t = ff_amf_get_field_value(ptr, data_end, "level", tmpstr, sizeof(tmpstr));
|
||||
if (!t && !strcmp(tmpstr, "error")) {
|
||||
if (!ff_amf_get_field_value(ptr, data_end,
|
||||
"description", tmpstr, sizeof(tmpstr)))
|
||||
t = ff_amf_get_field_value(ptr, data_end,
|
||||
"description", tmpstr, sizeof(tmpstr));
|
||||
if (t || !tmpstr[0])
|
||||
t = ff_amf_get_field_value(ptr, data_end, "code",
|
||||
tmpstr, sizeof(tmpstr));
|
||||
if (!t)
|
||||
av_log(s, AV_LOG_ERROR, "Server error: %s\n", tmpstr);
|
||||
return -1;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user