Merge commit 'a6b361325f2bfc8d9d4e5f761d6c1a07b209c4fb'

* commit 'a6b361325f2bfc8d9d4e5f761d6c1a07b209c4fb':
  rtmpproto: Print the error code string if there's no description

Merged-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2013-10-04 13:47:01 +02:00
commit 373d15525d
1 changed files with 6 additions and 2 deletions

View File

@ -2015,8 +2015,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;
}