Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
F
ffmpeg.wasm-core
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Linshizhi
ffmpeg.wasm-core
Commits
2d8c76eb
Commit
2d8c76eb
authored
Nov 03, 2012
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
asfdec: parse payload extension list
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
ac2a3a7a
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
2 deletions
+20
-2
asf.h
libavformat/asf.h
+8
-0
asfdec.c
libavformat/asfdec.c
+12
-2
No files found.
libavformat/asf.h
View file @
2d8c76eb
...
@@ -28,6 +28,11 @@
...
@@ -28,6 +28,11 @@
#define PACKET_SIZE 3200
#define PACKET_SIZE 3200
typedef
struct
ASFPayload
{
uint8_t
type
;
uint16_t
size
;
}
ASFPayload
;
typedef
struct
ASFStream
{
typedef
struct
ASFStream
{
int
num
;
int
num
;
unsigned
char
seq
;
unsigned
char
seq
;
...
@@ -47,6 +52,9 @@ typedef struct ASFStream {
...
@@ -47,6 +52,9 @@ typedef struct ASFStream {
int
palette_changed
;
int
palette_changed
;
uint32_t
palette
[
256
];
uint32_t
palette
[
256
];
int
payload_ext_ct
;
ASFPayload
payload
[
8
];
}
ASFStream
;
}
ASFStream
;
typedef
struct
ASFMainHeader
{
typedef
struct
ASFMainHeader
{
...
...
libavformat/asfdec.c
View file @
2d8c76eb
...
@@ -512,8 +512,10 @@ static int asf_read_ext_stream_properties(AVFormatContext *s, int64_t size)
...
@@ -512,8 +512,10 @@ static int asf_read_ext_stream_properties(AVFormatContext *s, int64_t size)
stream_ct
=
avio_rl16
(
pb
);
//stream-name-count
stream_ct
=
avio_rl16
(
pb
);
//stream-name-count
payload_ext_ct
=
avio_rl16
(
pb
);
//payload-extension-system-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
->
stream_bitrates
[
stream_num
]
=
leak_rate
;
asf
->
streams
[
stream_num
].
payload_ext_ct
=
0
;
}
for
(
i
=
0
;
i
<
stream_ct
;
i
++
){
for
(
i
=
0
;
i
<
stream_ct
;
i
++
){
avio_rl16
(
pb
);
avio_rl16
(
pb
);
...
@@ -522,10 +524,18 @@ static int asf_read_ext_stream_properties(AVFormatContext *s, int64_t size)
...
@@ -522,10 +524,18 @@ static int asf_read_ext_stream_properties(AVFormatContext *s, int64_t size)
}
}
for
(
i
=
0
;
i
<
payload_ext_ct
;
i
++
){
for
(
i
=
0
;
i
<
payload_ext_ct
;
i
++
){
int
size
;
ff_get_guid
(
pb
,
&
g
);
ff_get_guid
(
pb
,
&
g
);
avio_skip
(
pb
,
2
);
size
=
avio_rl16
(
pb
);
ext_len
=
avio_rl32
(
pb
);
ext_len
=
avio_rl32
(
pb
);
avio_skip
(
pb
,
ext_len
);
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
;
return
0
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment