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
c8eca438
Commit
c8eca438
authored
Jul 01, 2015
by
John Adlum
Committed by
Michael Niedermayer
Jul 02, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avformat/asfdec_f: factor error checking out of main header parsing loop
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
a1c03b9d
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
7 deletions
+6
-7
asfdec_f.c
libavformat/asfdec_f.c
+6
-7
No files found.
libavformat/asfdec_f.c
View file @
c8eca438
...
@@ -779,6 +779,7 @@ static int asf_read_header(AVFormatContext *s)
...
@@ -779,6 +779,7 @@ static int asf_read_header(AVFormatContext *s)
for
(;;)
{
for
(;;)
{
uint64_t
gpos
=
avio_tell
(
pb
);
uint64_t
gpos
=
avio_tell
(
pb
);
int
ret
=
0
;
ff_get_guid
(
pb
,
&
g
);
ff_get_guid
(
pb
,
&
g
);
gsize
=
avio_rl64
(
pb
);
gsize
=
avio_rl64
(
pb
);
print_guid
(
&
g
);
print_guid
(
&
g
);
...
@@ -795,13 +796,9 @@ static int asf_read_header(AVFormatContext *s)
...
@@ -795,13 +796,9 @@ static int asf_read_header(AVFormatContext *s)
if
(
gsize
<
24
)
if
(
gsize
<
24
)
return
AVERROR_INVALIDDATA
;
return
AVERROR_INVALIDDATA
;
if
(
!
ff_guidcmp
(
&
g
,
&
ff_asf_file_header
))
{
if
(
!
ff_guidcmp
(
&
g
,
&
ff_asf_file_header
))
{
int
ret
=
asf_read_file_properties
(
s
,
gsize
);
ret
=
asf_read_file_properties
(
s
,
gsize
);
if
(
ret
<
0
)
return
ret
;
}
else
if
(
!
ff_guidcmp
(
&
g
,
&
ff_asf_stream_header
))
{
}
else
if
(
!
ff_guidcmp
(
&
g
,
&
ff_asf_stream_header
))
{
int
ret
=
asf_read_stream_properties
(
s
,
gsize
);
ret
=
asf_read_stream_properties
(
s
,
gsize
);
if
(
ret
<
0
)
return
ret
;
}
else
if
(
!
ff_guidcmp
(
&
g
,
&
ff_asf_comment_header
))
{
}
else
if
(
!
ff_guidcmp
(
&
g
,
&
ff_asf_comment_header
))
{
asf_read_content_desc
(
s
,
gsize
);
asf_read_content_desc
(
s
,
gsize
);
}
else
if
(
!
ff_guidcmp
(
&
g
,
&
ff_asf_language_guid
))
{
}
else
if
(
!
ff_guidcmp
(
&
g
,
&
ff_asf_language_guid
))
{
...
@@ -830,7 +827,6 @@ static int asf_read_header(AVFormatContext *s)
...
@@ -830,7 +827,6 @@ static int asf_read_header(AVFormatContext *s)
if
(
!
s
->
keylen
)
{
if
(
!
s
->
keylen
)
{
if
(
!
ff_guidcmp
(
&
g
,
&
ff_asf_content_encryption
))
{
if
(
!
ff_guidcmp
(
&
g
,
&
ff_asf_content_encryption
))
{
unsigned
int
len
;
unsigned
int
len
;
int
ret
;
AVPacket
pkt
;
AVPacket
pkt
;
av_log
(
s
,
AV_LOG_WARNING
,
av_log
(
s
,
AV_LOG_WARNING
,
"DRM protected stream detected, decoding will likely fail!
\n
"
);
"DRM protected stream detected, decoding will likely fail!
\n
"
);
...
@@ -856,6 +852,9 @@ static int asf_read_header(AVFormatContext *s)
...
@@ -856,6 +852,9 @@ static int asf_read_header(AVFormatContext *s)
}
}
}
}
}
}
if
(
ret
<
0
)
return
ret
;
if
(
avio_tell
(
pb
)
!=
gpos
+
gsize
)
if
(
avio_tell
(
pb
)
!=
gpos
+
gsize
)
av_log
(
s
,
AV_LOG_DEBUG
,
av_log
(
s
,
AV_LOG_DEBUG
,
"gpos mismatch our pos=%"
PRIu64
", end=%"
PRId64
"
\n
"
,
"gpos mismatch our pos=%"
PRIu64
", end=%"
PRId64
"
\n
"
,
...
...
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