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
e6cc30c2
Commit
e6cc30c2
authored
Jul 15, 2011
by
Peter Ross
Committed by
Michael Niedermayer
Jul 15, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wtvdec: also support big-sectors when fat depth is zero
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
b43ca2de
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
3 deletions
+1
-3
wtvdec.c
libavformat/wtvdec.c
+1
-3
No files found.
libavformat/wtvdec.c
View file @
e6cc30c2
...
@@ -164,7 +164,6 @@ static AVIOContext * wtvfile_open_sector(int first_sector, uint64_t length, int
...
@@ -164,7 +164,6 @@ static AVIOContext * wtvfile_open_sector(int first_sector, uint64_t length, int
}
}
wf
->
sectors
[
0
]
=
first_sector
;
wf
->
sectors
[
0
]
=
first_sector
;
wf
->
nb_sectors
=
1
;
wf
->
nb_sectors
=
1
;
wf
->
sector_bits
=
WTV_SECTOR_BITS
;
}
else
if
(
depth
==
1
)
{
}
else
if
(
depth
==
1
)
{
wf
->
sectors
=
av_malloc
(
WTV_SECTOR_SIZE
);
wf
->
sectors
=
av_malloc
(
WTV_SECTOR_SIZE
);
if
(
!
wf
->
sectors
)
{
if
(
!
wf
->
sectors
)
{
...
@@ -172,7 +171,6 @@ static AVIOContext * wtvfile_open_sector(int first_sector, uint64_t length, int
...
@@ -172,7 +171,6 @@ static AVIOContext * wtvfile_open_sector(int first_sector, uint64_t length, int
return
NULL
;
return
NULL
;
}
}
wf
->
nb_sectors
=
read_ints
(
s
->
pb
,
wf
->
sectors
,
WTV_SECTOR_SIZE
/
4
);
wf
->
nb_sectors
=
read_ints
(
s
->
pb
,
wf
->
sectors
,
WTV_SECTOR_SIZE
/
4
);
wf
->
sector_bits
=
length
&
(
1ULL
<<
63
)
?
WTV_SECTOR_BITS
:
WTV_BIGSECTOR_BITS
;
}
else
if
(
depth
==
2
)
{
}
else
if
(
depth
==
2
)
{
uint32_t
sectors1
[
WTV_SECTOR_SIZE
/
4
];
uint32_t
sectors1
[
WTV_SECTOR_SIZE
/
4
];
int
nb_sectors1
=
read_ints
(
s
->
pb
,
sectors1
,
WTV_SECTOR_SIZE
/
4
);
int
nb_sectors1
=
read_ints
(
s
->
pb
,
sectors1
,
WTV_SECTOR_SIZE
/
4
);
...
@@ -189,12 +187,12 @@ static AVIOContext * wtvfile_open_sector(int first_sector, uint64_t length, int
...
@@ -189,12 +187,12 @@ static AVIOContext * wtvfile_open_sector(int first_sector, uint64_t length, int
break
;
break
;
wf
->
nb_sectors
+=
read_ints
(
s
->
pb
,
wf
->
sectors
+
i
*
WTV_SECTOR_SIZE
/
4
,
WTV_SECTOR_SIZE
/
4
);
wf
->
nb_sectors
+=
read_ints
(
s
->
pb
,
wf
->
sectors
+
i
*
WTV_SECTOR_SIZE
/
4
,
WTV_SECTOR_SIZE
/
4
);
}
}
wf
->
sector_bits
=
length
&
(
1ULL
<<
63
)
?
WTV_SECTOR_BITS
:
WTV_BIGSECTOR_BITS
;
}
else
{
}
else
{
av_log
(
s
,
AV_LOG_ERROR
,
"unsupported file allocation table depth (0x%x)
\n
"
,
depth
);
av_log
(
s
,
AV_LOG_ERROR
,
"unsupported file allocation table depth (0x%x)
\n
"
,
depth
);
av_free
(
wf
);
av_free
(
wf
);
return
NULL
;
return
NULL
;
}
}
wf
->
sector_bits
=
length
&
(
1ULL
<<
63
)
?
WTV_SECTOR_BITS
:
WTV_BIGSECTOR_BITS
;
if
(
!
wf
->
nb_sectors
)
{
if
(
!
wf
->
nb_sectors
)
{
av_free
(
wf
->
sectors
);
av_free
(
wf
->
sectors
);
...
...
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