Browse Source

Merge commit 'a6b361325f2bfc8d9d4e5f761d6c1a07b209c4fb'

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

Merged-by: Michael Niedermayer <michaelni@gmx.at>
tags/n2.1
Michael Niedermayer 12 years ago
parent
commit
373d15525d
1 changed files with 6 additions and 2 deletions
  1. +6
    -2
      libavformat/rtmpproto.c

+ 6
- 2
libavformat/rtmpproto.c 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;
}


Loading…
Cancel
Save