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
93f16f33
Commit
93f16f33
authored
Jul 17, 2015
by
Alexandra Hájková
Committed by
Anton Khirnov
Jul 22, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
asfdec: close the demuxer properly when read_header is failing
Signed-off-by:
Anton Khirnov
<
anton@khirnov.net
>
parent
5655236a
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
3 deletions
+8
-3
asfdec.c
libavformat/asfdec.c
+8
-3
No files found.
libavformat/asfdec.c
View file @
93f16f33
...
@@ -1659,14 +1659,14 @@ static int asf_read_header(AVFormatContext *s)
...
@@ -1659,14 +1659,14 @@ static int asf_read_header(AVFormatContext *s)
if
(
ret
==
AVERROR_EOF
&&
asf
->
data_reached
)
if
(
ret
==
AVERROR_EOF
&&
asf
->
data_reached
)
break
;
break
;
else
else
return
ret
;
goto
failed
;
}
}
g
=
find_guid
(
guid
);
g
=
find_guid
(
guid
);
if
(
g
)
{
if
(
g
)
{
asf
->
unknown_offset
=
asf
->
offset
;
asf
->
unknown_offset
=
asf
->
offset
;
asf
->
is_header
=
1
;
asf
->
is_header
=
1
;
if
((
ret
=
g
->
read_object
(
s
,
g
))
<
0
)
if
((
ret
=
g
->
read_object
(
s
,
g
))
<
0
)
return
ret
;
goto
failed
;
}
else
{
}
else
{
size
=
avio_rl64
(
pb
);
size
=
avio_rl64
(
pb
);
align_position
(
pb
,
asf
->
offset
,
size
);
align_position
(
pb
,
asf
->
offset
,
size
);
...
@@ -1677,7 +1677,8 @@ static int asf_read_header(AVFormatContext *s)
...
@@ -1677,7 +1677,8 @@ static int asf_read_header(AVFormatContext *s)
if
(
!
asf
->
data_reached
)
{
if
(
!
asf
->
data_reached
)
{
av_log
(
s
,
AV_LOG_ERROR
,
"Data Object was not found.
\n
"
);
av_log
(
s
,
AV_LOG_ERROR
,
"Data Object was not found.
\n
"
);
return
AVERROR_INVALIDDATA
;
ret
=
AVERROR_INVALIDDATA
;
goto
failed
;
}
}
if
(
pb
->
seekable
)
if
(
pb
->
seekable
)
avio_seek
(
pb
,
asf
->
first_packet_offset
,
SEEK_SET
);
avio_seek
(
pb
,
asf
->
first_packet_offset
,
SEEK_SET
);
...
@@ -1702,6 +1703,10 @@ static int asf_read_header(AVFormatContext *s)
...
@@ -1702,6 +1703,10 @@ static int asf_read_header(AVFormatContext *s)
}
}
return
0
;
return
0
;
failed:
asf_read_close
(
s
);
return
ret
;
}
}
AVInputFormat
ff_asf_demuxer
=
{
AVInputFormat
ff_asf_demuxer
=
{
...
...
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