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
a0a7b154
Commit
a0a7b154
authored
Jan 06, 2015
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tools/ismindex: Keep count fields consistent with arrays in case of errors
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
d2838f09
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletion
+3
-1
ismindex.c
tools/ismindex.c
+3
-1
No files found.
tools/ismindex.c
View file @
a0a7b154
...
@@ -340,6 +340,7 @@ static int read_tfra(struct Tracks *tracks, int start_index, AVIOContext *f)
...
@@ -340,6 +340,7 @@ static int read_tfra(struct Tracks *tracks, int start_index, AVIOContext *f)
track
->
chunks
=
avio_rb32
(
f
);
track
->
chunks
=
avio_rb32
(
f
);
track
->
offsets
=
av_mallocz_array
(
track
->
chunks
,
sizeof
(
*
track
->
offsets
));
track
->
offsets
=
av_mallocz_array
(
track
->
chunks
,
sizeof
(
*
track
->
offsets
));
if
(
!
track
->
offsets
)
{
if
(
!
track
->
offsets
)
{
track
->
chunks
=
0
;
ret
=
AVERROR
(
ENOMEM
);
ret
=
AVERROR
(
ENOMEM
);
goto
fail
;
goto
fail
;
}
}
...
@@ -448,10 +449,11 @@ fail:
...
@@ -448,10 +449,11 @@ fail:
static
int
get_private_data
(
struct
Track
*
track
,
AVCodecContext
*
codec
)
static
int
get_private_data
(
struct
Track
*
track
,
AVCodecContext
*
codec
)
{
{
track
->
codec_private_size
=
codec
->
extradata_size
;
track
->
codec_private_size
=
0
;
track
->
codec_private
=
av_mallocz
(
codec
->
extradata_size
);
track
->
codec_private
=
av_mallocz
(
codec
->
extradata_size
);
if
(
!
track
->
codec_private
)
if
(
!
track
->
codec_private
)
return
AVERROR
(
ENOMEM
);
return
AVERROR
(
ENOMEM
);
track
->
codec_private_size
=
codec
->
extradata_size
;
memcpy
(
track
->
codec_private
,
codec
->
extradata
,
codec
->
extradata_size
);
memcpy
(
track
->
codec_private
,
codec
->
extradata
,
codec
->
extradata_size
);
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