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
d08ea75a
Commit
d08ea75a
authored
Dec 23, 2013
by
Peter Ross
Committed by
Michael Niedermayer
Dec 23, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wtvenc: test avio_size() validity
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
5a1bfa7e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletion
+3
-1
wtvdec.c
libavformat/wtvdec.c
+3
-1
No files found.
libavformat/wtvdec.c
View file @
d08ea75a
...
...
@@ -153,6 +153,7 @@ static AVIOContext * wtvfile_open_sector(int first_sector, uint64_t length, int
AVIOContext
*
pb
;
WtvFile
*
wf
;
uint8_t
*
buffer
;
int64_t
size
;
if
(
seek_by_sector
(
s
->
pb
,
first_sector
,
0
)
<
0
)
return
NULL
;
...
...
@@ -205,7 +206,8 @@ static AVIOContext * wtvfile_open_sector(int first_sector, uint64_t length, int
return
NULL
;
}
if
((
int64_t
)
wf
->
sectors
[
wf
->
nb_sectors
-
1
]
<<
WTV_SECTOR_BITS
>
avio_size
(
s
->
pb
))
size
=
avio_size
(
s
->
pb
);
if
(
size
>=
0
&&
(
int64_t
)
wf
->
sectors
[
wf
->
nb_sectors
-
1
]
<<
WTV_SECTOR_BITS
>
size
)
av_log
(
s
,
AV_LOG_WARNING
,
"truncated file
\n
"
);
/* check length */
...
...
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