[rtmpdump] [PATCH v2] Fix Handle AMF_ECMA_ARRAY and AMF_STRICT_ARRAY objects
Steven Penny
svnpenn at gmail.com
Sun Dec 2 04:48:36 CET 2012
This fixes metadata and percent logging.
http://lists.mplayerhq.hu/pipermail/rtmpdump/2012-November/002189.html
Bad example
INFO: Metadata:
2256.298 kB / 174.99 sec
Download complete
Good example
INFO: Metadata:
INFO: duration 175.01
INFO: moovPosition 2182010.00
INFO: audiocodecid mp4a
INFO: aacaot 2.00
INFO: audiosamplerate 44100.00
INFO: audiochannels 2.00
INFO: tags:
INFO: -¬too FAAC 1.28
INFO: trackinfo:
INFO: length 7717888.00
INFO: timescale 44100.00
INFO: sampledescription:
INFO: sampletype mp4a
2256.298 kB / 174.99 sec (99.9%)
Download complete
---
librtmp/rtmp.c | 9 +++++++--
1 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/librtmp/rtmp.c b/librtmp/rtmp.c
index bfe5a16..37d8cfd 100644
--- a/librtmp/rtmp.c
+++ b/librtmp/rtmp.c
@@ -3280,7 +3280,7 @@ RTMP_FindFirstMatchingProperty(AMFObject *obj, const AVal *name,
return TRUE;
}
- if (prop->p_type == AMF_OBJECT)
+ if (prop->p_type == AMF_OBJECT || prop->p_type == AMF_ECMA_ARRAY)
{
if (RTMP_FindFirstMatchingProperty(&prop->p_vu.p_object, name, p))
return TRUE;
@@ -3323,7 +3323,12 @@ DumpMetaData(AMFObject *obj)
for (n = 0; n < obj->o_num; n++)
{
prop = AMF_GetProp(obj, NULL, n);
- if (prop->p_type != AMF_OBJECT)
+ if
+ (
+ prop->p_type != AMF_OBJECT &&
+ prop->p_type != AMF_ECMA_ARRAY &&
+ prop->p_type != AMF_STRICT_ARRAY
+ )
{
char str[256] = "";
switch (prop->p_type)
--
1.7.9
More information about the rtmpdump
mailing list