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
988a7f86
Commit
988a7f86
authored
Jan 14, 2013
by
Jean-Baptiste Kempf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Ogg: use calloc
parent
105af824
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
22 deletions
+9
-22
modules/demux/ogg.c
modules/demux/ogg.c
+6
-16
modules/demux/ogg.h
modules/demux/ogg.h
+1
-1
modules/demux/oggseek.h
modules/demux/oggseek.h
+2
-5
No files found.
modules/demux/ogg.c
View file @
988a7f86
...
...
@@ -156,7 +156,6 @@ static int Open( vlc_object_t * p_this )
demux_sys_t
*
p_sys
;
const
uint8_t
*
p_peek
;
/* Check if we are dealing with an ogg stream */
if
(
stream_Peek
(
p_demux
->
s
,
&
p_peek
,
4
)
<
4
)
return
VLC_EGENERIC
;
if
(
!
p_demux
->
b_force
&&
memcmp
(
p_peek
,
"OggS"
,
4
)
)
...
...
@@ -164,30 +163,21 @@ static int Open( vlc_object_t * p_this )
return
VLC_EGENERIC
;
}
/* Set exported functions */
p_demux
->
pf_demux
=
Demux
;
p_demux
->
pf_control
=
Control
;
p_demux
->
p_sys
=
p_sys
=
malloc
(
sizeof
(
demux_sys_t
)
);
/* */
p_demux
->
p_sys
=
p_sys
=
calloc
(
1
,
sizeof
(
demux_sys_t
)
);
if
(
!
p_sys
)
return
VLC_ENOMEM
;
memset
(
p_sys
,
0
,
sizeof
(
demux_sys_t
)
);
p_sys
->
i_bitrate
=
0
;
p_sys
->
pp_stream
=
NULL
;
p_sys
->
p_old_stream
=
NULL
;
/* Begnning of stream, tell the demux to look for elementary streams. */
p_sys
->
i_bos
=
0
;
p_sys
->
i_eos
=
0
;
p_sys
->
i_length
=
-
1
;
/* Set exported functions */
p_demux
->
pf_demux
=
Demux
;
p_demux
->
pf_control
=
Control
;
/* Initialize the Ogg physical bitstream parser */
ogg_sync_init
(
&
p_sys
->
oy
);
p_sys
->
b_page_waiting
=
false
;
/* */
p_sys
->
p_meta
=
NULL
;
TAB_INIT
(
p_sys
->
i_seekpoints
,
p_sys
->
pp_seekpoints
);
return
VLC_SUCCESS
;
...
...
modules/demux/ogg.h
View file @
988a7f86
...
...
@@ -110,7 +110,7 @@ struct demux_sys_t
mtime_t
i_pcr
;
/* stream state */
int
i_bos
;
int
i_bos
;
/* Begnning of stream, tell the demux to look for elementary streams. */
int
i_eos
;
/* bitrate */
...
...
modules/demux/oggseek.h
View file @
988a7f86
...
...
@@ -49,9 +49,6 @@ struct oggseek_index_entry
int64_t
i_pagepos_end
;
};
const
demux_index_entry_t
*
oggseek_theora_index_entry_add
(
logical_stream_t
*
,
int64_t
i_granule
,
int64_t
i_pagepos
);
...
...
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