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
ceba96cb
Commit
ceba96cb
authored
Jan 22, 2007
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
replace wrong return 0 by -1
Originally committed as revision 7654 to
svn://svn.ffmpeg.org/ffmpeg/trunk
parent
13f7e4b9
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
4 deletions
+6
-4
asf.c
libavformat/asf.c
+6
-4
No files found.
libavformat/asf.c
View file @
ceba96cb
...
...
@@ -502,11 +502,11 @@ static int asf_get_packet(AVFormatContext *s)
//the following checks prevent overflows and infinite loops
if
(
packet_length
>=
(
1U
<<
29
)){
av_log
(
s
,
AV_LOG_ERROR
,
"invalid packet_length %d at:%"
PRId64
"
\n
"
,
packet_length
,
url_ftell
(
pb
));
return
0
;
// FIXME this should be -1
return
-
1
;
}
if
(
padsize
>=
(
1U
<<
29
)){
av_log
(
s
,
AV_LOG_ERROR
,
"invalid padsize %d at:%"
PRId64
"
\n
"
,
padsize
,
url_ftell
(
pb
));
return
0
;
// FIXME this should be -1
return
-
1
;
}
asf
->
packet_timestamp
=
get_le32
(
pb
);
...
...
@@ -598,6 +598,8 @@ static int asf_read_packet(AVFormatContext *s, AVPacket *pkt)
ByteIOContext
*
pb
=
&
s
->
pb
;
//static int pc = 0;
for
(;;)
{
if
(
url_feof
(
pb
))
return
AVERROR_IO
;
if
(
asf
->
packet_size_left
<
FRAME_HEADER_SIZE
||
asf
->
packet_segments
<
1
)
{
//asf->packet_size_left <= asf->packet_padsize) {
...
...
@@ -619,8 +621,8 @@ static int asf_read_packet(AVFormatContext *s, AVPacket *pkt)
return
AVERROR_IO
;
/* Do not exceed the size of the data object */
ret
=
asf_get_packet
(
s
);
//printf("READ ASF PACKET %d r:%d c:%d\n", ret, asf->packet_size_left, pc++);
if
(
ret
<
0
||
url_feof
(
pb
)
)
return
AVERROR_IO
;
if
(
ret
<
0
)
assert
(
asf
->
packet_size_left
<
FRAME_HEADER_SIZE
||
asf
->
packet_segments
<
1
)
;
asf
->
packet_time_start
=
0
;
continue
;
}
...
...
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