Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-2-2
Commits
4100a942
Commit
4100a942
authored
Oct 02, 2014
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avformat: check memory allocations
(cherry picked from commit 0361af77c96214ce04257fe843e6bf31a05f4ad4)
parent
20948260
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
modules/demux/avformat/demux.c
modules/demux/avformat/demux.c
+6
-6
No files found.
modules/demux/avformat/demux.c
View file @
4100a942
...
@@ -255,7 +255,7 @@ int OpenDemux( vlc_object_t *p_this )
...
@@ -255,7 +255,7 @@ int OpenDemux( vlc_object_t *p_this )
/* Fill p_demux fields */
/* Fill p_demux fields */
p_demux
->
pf_demux
=
Demux
;
p_demux
->
pf_demux
=
Demux
;
p_demux
->
pf_control
=
Control
;
p_demux
->
pf_control
=
Control
;
p_demux
->
p_sys
=
p_sys
=
malloc
(
sizeof
(
demux_sys_t
)
);
p_demux
->
p_sys
=
p_sys
=
x
malloc
(
sizeof
(
demux_sys_t
)
);
p_sys
->
ic
=
0
;
p_sys
->
ic
=
0
;
p_sys
->
fmt
=
fmt
;
p_sys
->
fmt
=
fmt
;
p_sys
->
i_tk
=
0
;
p_sys
->
i_tk
=
0
;
...
@@ -267,7 +267,7 @@ int OpenDemux( vlc_object_t *p_this )
...
@@ -267,7 +267,7 @@ int OpenDemux( vlc_object_t *p_this )
/* Create I/O wrapper */
/* Create I/O wrapper */
p_sys
->
io_buffer_size
=
32768
;
/* FIXME */
p_sys
->
io_buffer_size
=
32768
;
/* FIXME */
p_sys
->
io_buffer
=
malloc
(
p_sys
->
io_buffer_size
);
p_sys
->
io_buffer
=
x
malloc
(
p_sys
->
io_buffer_size
);
p_sys
->
ic
=
avformat_alloc_context
();
p_sys
->
ic
=
avformat_alloc_context
();
p_sys
->
ic
->
pb
=
avio_alloc_context
(
p_sys
->
io_buffer
,
p_sys
->
ic
->
pb
=
avio_alloc_context
(
p_sys
->
io_buffer
,
...
@@ -391,7 +391,7 @@ int OpenDemux( vlc_object_t *p_this )
...
@@ -391,7 +391,7 @@ int OpenDemux( vlc_object_t *p_this )
#if LIBAVCODEC_VERSION_MAJOR < 54
#if LIBAVCODEC_VERSION_MAJOR < 54
if
(
cc
->
palctrl
)
if
(
cc
->
palctrl
)
{
{
fmt
.
video
.
p_palette
=
malloc
(
sizeof
(
video_palette_t
)
);
fmt
.
video
.
p_palette
=
x
malloc
(
sizeof
(
video_palette_t
)
);
*
fmt
.
video
.
p_palette
=
*
(
video_palette_t
*
)
cc
->
palctrl
;
*
fmt
.
video
.
p_palette
=
*
(
video_palette_t
*
)
cc
->
palctrl
;
}
}
#else
#else
...
@@ -598,7 +598,7 @@ int OpenDemux( vlc_object_t *p_this )
...
@@ -598,7 +598,7 @@ int OpenDemux( vlc_object_t *p_this )
TAB_APPEND
(
p_sys
->
i_tk
,
p_sys
->
tk
,
es
);
TAB_APPEND
(
p_sys
->
i_tk
,
p_sys
->
tk
,
es
);
}
}
}
}
p_sys
->
tk_pcr
=
calloc
(
p_sys
->
i_tk
,
sizeof
(
*
p_sys
->
tk_pcr
)
);
p_sys
->
tk_pcr
=
x
calloc
(
p_sys
->
i_tk
,
sizeof
(
*
p_sys
->
tk_pcr
)
);
if
(
p_sys
->
ic
->
start_time
!=
(
int64_t
)
AV_NOPTS_VALUE
)
if
(
p_sys
->
ic
->
start_time
!=
(
int64_t
)
AV_NOPTS_VALUE
)
i_start_time
=
p_sys
->
ic
->
start_time
*
1000000
/
AV_TIME_BASE
;
i_start_time
=
p_sys
->
ic
->
start_time
*
1000000
/
AV_TIME_BASE
;
...
@@ -1012,7 +1012,7 @@ static int Control( demux_t *p_demux, int i_query, va_list args )
...
@@ -1012,7 +1012,7 @@ static int Control( demux_t *p_demux, int i_query, va_list args )
return
VLC_EGENERIC
;
return
VLC_EGENERIC
;
*
pi_int
=
p_sys
->
i_attachments
;;
*
pi_int
=
p_sys
->
i_attachments
;;
*
ppp_attach
=
malloc
(
sizeof
(
input_attachment_t
*
)
*
p_sys
->
i_attachments
);
*
ppp_attach
=
x
malloc
(
sizeof
(
input_attachment_t
*
)
*
p_sys
->
i_attachments
);
for
(
i
=
0
;
i
<
p_sys
->
i_attachments
;
i
++
)
for
(
i
=
0
;
i
<
p_sys
->
i_attachments
;
i
++
)
(
*
ppp_attach
)[
i
]
=
vlc_input_attachment_Duplicate
(
p_sys
->
attachments
[
i
]
);
(
*
ppp_attach
)[
i
]
=
vlc_input_attachment_Duplicate
(
p_sys
->
attachments
[
i
]
);
return
VLC_SUCCESS
;
return
VLC_SUCCESS
;
...
@@ -1029,7 +1029,7 @@ static int Control( demux_t *p_demux, int i_query, va_list args )
...
@@ -1029,7 +1029,7 @@ static int Control( demux_t *p_demux, int i_query, va_list args )
return
VLC_EGENERIC
;
return
VLC_EGENERIC
;
*
pi_int
=
1
;
*
pi_int
=
1
;
*
ppp_title
=
malloc
(
sizeof
(
input_title_t
*
)
);
*
ppp_title
=
x
malloc
(
sizeof
(
input_title_t
*
)
);
(
*
ppp_title
)[
0
]
=
vlc_input_title_Duplicate
(
p_sys
->
p_title
);
(
*
ppp_title
)[
0
]
=
vlc_input_title_Duplicate
(
p_sys
->
p_title
);
*
pi_title_offset
=
0
;
*
pi_title_offset
=
0
;
*
pi_seekpoint_offset
=
0
;
*
pi_seekpoint_offset
=
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