Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
FFmpeg
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
libremedia
Tethys
FFmpeg
Commits
2d8c76eb
Commit
2d8c76eb
authored
12 years ago
by
Michael Niedermayer
Browse files
Options
Downloads
Patches
Plain Diff
asfdec: parse payload extension list
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
ac2a3a7a
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
libavformat/asf.h
+8
-0
8 additions, 0 deletions
libavformat/asf.h
libavformat/asfdec.c
+12
-2
12 additions, 2 deletions
libavformat/asfdec.c
with
20 additions
and
2 deletions
libavformat/asf.h
+
8
−
0
View file @
2d8c76eb
...
...
@@ -28,6 +28,11 @@
#define PACKET_SIZE 3200
typedef
struct
ASFPayload
{
uint8_t
type
;
uint16_t
size
;
}
ASFPayload
;
typedef
struct
ASFStream
{
int
num
;
unsigned
char
seq
;
...
...
@@ -47,6 +52,9 @@ typedef struct ASFStream {
int
palette_changed
;
uint32_t
palette
[
256
];
int
payload_ext_ct
;
ASFPayload
payload
[
8
];
}
ASFStream
;
typedef
struct
ASFMainHeader
{
...
...
This diff is collapsed.
Click to expand it.
libavformat/asfdec.c
+
12
−
2
View file @
2d8c76eb
...
...
@@ -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
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment