[rtmpdump] [PATCH] Fix Handle AMF_ECMA_ARRAY and AMF_STRICT_ARRAY objects
Steven Penny
svnpenn at gmail.com
Thu Nov 15 20:36:45 CET 2012
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 | 16 ++++++++--------
1 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/librtmp/rtmp.c b/librtmp/rtmp.c
index 0e00059..dfc32c4 100644
--- a/librtmp/rtmp.c
+++ b/librtmp/rtmp.c
@@ -3264,8 +3264,14 @@ 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)
+ {
+ if (prop->p_name.av_len)
+ RTMP_Log(RTMP_LOGINFO, "%.*s:", prop->p_name.av_len, prop->p_name.av_val);
+ DumpMetaData(&prop->p_vu.p_object);
+ }
+ else
+ {
char str[256] = "";
switch (prop->p_type)
{
@@ -3296,12 +3302,6 @@ DumpMetaData(AMFObject *obj)
prop->p_name.av_val, str);
}
}
- else
- {
- if (prop->p_name.av_len)
- RTMP_Log(RTMP_LOGINFO, "%.*s:", prop->p_name.av_len, prop->p_name.av_val);
- DumpMetaData(&prop->p_vu.p_object);
- }
}
return FALSE;
}
--
1.7.9
More information about the rtmpdump
mailing list