diff options
author | Michael Niedermayer | 2013-10-04 13:47:01 +0200 |
---|---|---|
committer | Michael Niedermayer | 2013-10-04 13:47:06 +0200 |
commit | 373d15525d3de87f419f87c4c69b32c265a47310 (patch) | |
tree | 651f891d8532b89de01a0588307c738feb035727 /libavformat/rtmpproto.c | |
parent | b46f19100b08af54056abf6fb2351f32fb0d91bd (diff) | |
parent | a6b361325f2bfc8d9d4e5f761d6c1a07b209c4fb (diff) |
Merge commit 'a6b361325f2bfc8d9d4e5f761d6c1a07b209c4fb'
* commit 'a6b361325f2bfc8d9d4e5f761d6c1a07b209c4fb':
rtmpproto: Print the error code string if there's no description
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/rtmpproto.c')
-rw-r--r-- | libavformat/rtmpproto.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/libavformat/rtmpproto.c b/libavformat/rtmpproto.c index 6246ba6173..bbc6ad7cb1 100644 --- a/libavformat/rtmpproto.c +++ b/libavformat/rtmpproto.c @@ -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; } |