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
979e9e8f
Commit
979e9e8f
authored
Jul 26, 2013
by
Martin Storsjö
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wtv: Drop some casts that now are unnecessary
Signed-off-by:
Martin Storsjö
<
martin@martin.st
>
parent
86f042dc
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
wtv.c
libavformat/wtv.c
+4
-4
No files found.
libavformat/wtv.c
View file @
979e9e8f
...
...
@@ -94,7 +94,7 @@ static int wtvfile_read_packet(void *opaque, uint8_t *buf, int buf_size)
int
i
=
wf
->
position
>>
wf
->
sector_bits
;
if
(
i
>=
wf
->
nb_sectors
||
(
wf
->
sectors
[
i
]
!=
wf
->
sectors
[
i
-
1
]
+
(
1
<<
(
wf
->
sector_bits
-
WTV_SECTOR_BITS
))
&&
avio_seek
(
pb
,
(
int64_t
)
wf
->
sectors
[
i
]
<<
WTV_SECTOR_BITS
,
SEEK_SET
)
<
0
))
{
avio_seek
(
pb
,
wf
->
sectors
[
i
]
<<
WTV_SECTOR_BITS
,
SEEK_SET
)
<
0
))
{
wf
->
error
=
1
;
break
;
}
...
...
@@ -119,7 +119,7 @@ static int64_t wtvfile_seek(void *opaque, int64_t offset, int whence)
offset
=
wf
->
length
;
wf
->
error
=
offset
<
0
||
offset
>=
wf
->
length
||
avio_seek
(
pb
,
(
(
int64_t
)
wf
->
sectors
[
offset
>>
wf
->
sector_bits
]
<<
WTV_SECTOR_BITS
)
avio_seek
(
pb
,
(
wf
->
sectors
[
offset
>>
wf
->
sector_bits
]
<<
WTV_SECTOR_BITS
)
+
(
offset
&
((
1
<<
wf
->
sector_bits
)
-
1
)),
SEEK_SET
)
<
0
;
wf
->
position
=
offset
;
return
offset
;
...
...
@@ -191,7 +191,7 @@ static AVIOContext * wtvfile_open_sector(int first_sector, uint64_t length, int
}
wf
->
nb_sectors
=
0
;
for
(
i
=
0
;
i
<
nb_sectors1
;
i
++
)
{
if
(
avio_seek
(
s
->
pb
,
(
int64_t
)
sectors1
[
i
]
<<
WTV_SECTOR_BITS
,
SEEK_SET
)
<
0
)
if
(
avio_seek
(
s
->
pb
,
sectors1
[
i
]
<<
WTV_SECTOR_BITS
,
SEEK_SET
)
<
0
)
break
;
wf
->
nb_sectors
+=
read_ints
(
s
->
pb
,
wf
->
sectors
+
i
*
WTV_SECTOR_SIZE
/
4
,
WTV_SECTOR_SIZE
/
4
);
}
...
...
@@ -218,7 +218,7 @@ static AVIOContext * wtvfile_open_sector(int first_sector, uint64_t length, int
/* seek to initial sector */
wf
->
position
=
0
;
if
(
avio_seek
(
s
->
pb
,
(
int64_t
)
wf
->
sectors
[
0
]
<<
WTV_SECTOR_BITS
,
SEEK_SET
)
<
0
)
{
if
(
avio_seek
(
s
->
pb
,
wf
->
sectors
[
0
]
<<
WTV_SECTOR_BITS
,
SEEK_SET
)
<
0
)
{
av_free
(
wf
->
sectors
);
av_free
(
wf
);
return
NULL
;
...
...
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