[rtmpdump] branch master updated. 4e06e21 Support decoding AMF_XML_DOC

gitolite gil at avcodec.org
Fri Dec 23 07:14:02 CET 2011


The branch, master has been updated
       via  4e06e218e230a86608637b613499984703a342cf (commit)
      from  5d03a4f0d6216da92830306436eae7eb318d5115 (commit)


- Log -----------------------------------------------------------------
commit 4e06e218e230a86608637b613499984703a342cf
Author:     Antti Ajanki <antti.ajanki at iki.fi>
AuthorDate: Thu Dec 22 17:54:10 2011 -0800
Commit:     Howard Chu <hyc at highlandsun.com>
CommitDate: Thu Dec 22 17:54:10 2011 -0800

    Support decoding AMF_XML_DOC
    
    MF_XML_DOC data is an XML document which is encoded similarly to a
    long string.

diff --git a/librtmp/amf.c b/librtmp/amf.c
index f9ecf21..659421e 100644
--- a/librtmp/amf.c
+++ b/librtmp/amf.c
@@ -735,13 +735,15 @@ AMFProp_Decode(AMFObjectProperty *prop, const char *pBuffer, int nSize,
 	break;
       }
     case AMF_LONG_STRING:
+    case AMF_XML_DOC:
       {
 	unsigned int nStringSize = AMF_DecodeInt32(pBuffer);
 	if (nSize < (long)nStringSize + 4)
 	  return -1;
 	AMF_DecodeLongString(pBuffer, &prop->p_vu.p_aval);
 	nSize -= (4 + nStringSize);
-	prop->p_type = AMF_STRING;
+	if (prop->p_type == AMF_LONG_STRING)
+	  prop->p_type = AMF_STRING;
 	break;
       }
     case AMF_RECORDSET:
@@ -750,12 +752,6 @@ AMFProp_Decode(AMFObjectProperty *prop, const char *pBuffer, int nSize,
 	return -1;
 	break;
       }
-    case AMF_XML_DOC:
-      {
-	RTMP_Log(RTMP_LOGERROR, "AMF_XML_DOC not supported!");
-	return -1;
-	break;
-      }
     case AMF_TYPED_OBJECT:
       {
 	RTMP_Log(RTMP_LOGERROR, "AMF_TYPED_OBJECT not supported!");

-----------------------------------------------------------------------

Summary of changes:
 librtmp/amf.c |   10 +++-------
 1 files changed, 3 insertions(+), 7 deletions(-)


hooks/post-receive
-- 



More information about the rtmpdump mailing list