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
00a63bfb
Commit
00a63bfb
authored
Sep 12, 2013
by
Alexandra Khirnova
Committed by
Diego Biurrun
Sep 12, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
matroskaenc: Fix stray pointers left over from av_reallocp_array refactoring
Signed-off-by:
Diego Biurrun
<
diego@biurrun.de
>
parent
c0779a67
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
13 deletions
+9
-13
matroskaenc.c
libavformat/matroskaenc.c
+9
-13
No files found.
libavformat/matroskaenc.c
View file @
00a63bfb
...
@@ -294,23 +294,21 @@ static mkv_seekhead * mkv_start_seekhead(AVIOContext *pb, int64_t segment_offset
...
@@ -294,23 +294,21 @@ static mkv_seekhead * mkv_start_seekhead(AVIOContext *pb, int64_t segment_offset
static
int
mkv_add_seekhead_entry
(
mkv_seekhead
*
seekhead
,
unsigned
int
elementid
,
uint64_t
filepos
)
static
int
mkv_add_seekhead_entry
(
mkv_seekhead
*
seekhead
,
unsigned
int
elementid
,
uint64_t
filepos
)
{
{
mkv_seekhead_entry
*
entries
=
seekhead
->
entries
;
int
err
;
int
err
;
// don't store more elements than we reserved space for
// don't store more elements than we reserved space for
if
(
seekhead
->
max_entries
>
0
&&
seekhead
->
max_entries
<=
seekhead
->
num_entries
)
if
(
seekhead
->
max_entries
>
0
&&
seekhead
->
max_entries
<=
seekhead
->
num_entries
)
return
-
1
;
return
-
1
;
if
((
err
=
av_reallocp_array
(
&
entries
,
seekhead
->
num_entries
+
1
,
if
((
err
=
av_reallocp_array
(
&
seekhead
->
entries
,
seekhead
->
num_entries
+
1
,
sizeof
(
*
entries
)))
<
0
)
{
sizeof
(
*
seekhead
->
entries
)))
<
0
)
{
seekhead
->
num_entries
=
0
;
seekhead
->
num_entries
=
0
;
return
err
;
return
err
;
}
}
entries
[
seekhead
->
num_entries
].
elementid
=
elementid
;
seekhead
->
entries
[
seekhead
->
num_entries
].
elementid
=
elementid
;
entries
[
seekhead
->
num_entries
++
].
segmentpos
=
filepos
-
seekhead
->
segment_offset
;
seekhead
->
entries
[
seekhead
->
num_entries
++
].
segmentpos
=
filepos
-
seekhead
->
segment_offset
;
seekhead
->
entries
=
entries
;
return
0
;
return
0
;
}
}
...
@@ -379,23 +377,21 @@ static mkv_cues * mkv_start_cues(int64_t segment_offset)
...
@@ -379,23 +377,21 @@ static mkv_cues * mkv_start_cues(int64_t segment_offset)
static
int
mkv_add_cuepoint
(
mkv_cues
*
cues
,
int
stream
,
int64_t
ts
,
int64_t
cluster_pos
)
static
int
mkv_add_cuepoint
(
mkv_cues
*
cues
,
int
stream
,
int64_t
ts
,
int64_t
cluster_pos
)
{
{
mkv_cuepoint
*
entries
=
cues
->
entries
;
int
err
;
int
err
;
if
(
ts
<
0
)
if
(
ts
<
0
)
return
0
;
return
0
;
if
((
err
=
av_reallocp_array
(
&
entries
,
cues
->
num_entries
+
1
,
if
((
err
=
av_reallocp_array
(
&
cues
->
entries
,
cues
->
num_entries
+
1
,
sizeof
(
*
entries
)))
<
0
)
{
sizeof
(
*
cues
->
entries
)))
<
0
)
{
cues
->
num_entries
=
0
;
cues
->
num_entries
=
0
;
return
err
;
return
err
;
}
}
entries
[
cues
->
num_entries
].
pts
=
ts
;
cues
->
entries
[
cues
->
num_entries
].
pts
=
ts
;
entries
[
cues
->
num_entries
].
tracknum
=
stream
+
1
;
cues
->
entries
[
cues
->
num_entries
].
tracknum
=
stream
+
1
;
entries
[
cues
->
num_entries
++
].
cluster_pos
=
cluster_pos
-
cues
->
segment_offset
;
cues
->
entries
[
cues
->
num_entries
++
].
cluster_pos
=
cluster_pos
-
cues
->
segment_offset
;
cues
->
entries
=
entries
;
return
0
;
return
0
;
}
}
...
...
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