summaryrefslogtreecommitdiff
path: root/libavformat/asfdec.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-11-03 05:35:35 +0100
committerMichael Niedermayer <michaelni@gmx.at>2012-11-03 05:35:35 +0100
commit2d8c76eb1f1c198e81c36a95c0d56e55cc1f4c5a (patch)
tree7064a00d1c9edffe01fb615c33b4f474598b1dff /libavformat/asfdec.c
parentac2a3a7a05197844f01ddeea972cfbbc511e1efb (diff)
asfdec: parse payload extension list
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/asfdec.c')
-rw-r--r--libavformat/asfdec.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/libavformat/asfdec.c b/libavformat/asfdec.c
index 9f56818312..4ad5c2dfd7 100644
--- a/libavformat/asfdec.c
+++ b/libavformat/asfdec.c
@@ -512,8 +512,10 @@ static int asf_read_ext_stream_properties(AVFormatContext *s, int64_t size)
stream_ct = avio_rl16(pb); //stream-name-count
payload_ext_ct = avio_rl16(pb); //payload-extension-system-count
- if (stream_num < 128)
+ if (stream_num < 128) {
asf->stream_bitrates[stream_num] = leak_rate;
+ asf->streams[stream_num].payload_ext_ct = 0;
+ }
for (i=0; i<stream_ct; i++){
avio_rl16(pb);
@@ -522,10 +524,18 @@ static int asf_read_ext_stream_properties(AVFormatContext *s, int64_t size)
}
for (i=0; i<payload_ext_ct; i++){
+ int size;
ff_get_guid(pb, &g);
- avio_skip(pb, 2);
+ size = avio_rl16(pb);
ext_len=avio_rl32(pb);
avio_skip(pb, ext_len);
+ if (stream_num < 128 && i < FF_ARRAY_ELEMS(asf->streams[stream_num].payload)) {
+ ASFPayload *p = &asf->streams[stream_num].payload[i];
+ p->type = g[0];
+ p->size = size;
+ av_log(s, AV_LOG_DEBUG, "Payload extension %x %d\n", g[0], p->size );
+ asf->streams[stream_num].payload_ext_ct ++;
+ }
}
return 0;