Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-1.1
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-1.1
Commits
e86b6a0a
Commit
e86b6a0a
authored
Feb 22, 2007
by
Laurent Aimar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Do not use p_demux->p_parent to get the p_input
(Use vlc_find_object(PARENT)
parent
e7a8394a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
35 additions
and
27 deletions
+35
-27
modules/demux/mp4/mp4.c
modules/demux/mp4/mp4.c
+28
-24
modules/demux/ogg.c
modules/demux/ogg.c
+7
-3
No files found.
modules/demux/mp4/mp4.c
View file @
e86b6a0a
...
...
@@ -2210,31 +2210,35 @@ static void MP4_TrackSetELST( demux_t *p_demux, mp4_track_t *tk,
}
static
vlc_bool_t
FindItem
(
demux_t
*
p_demux
,
playlist_t
*
p_playlist
,
playlist_item_t
**
pp_item
)
playlist_item_t
**
pp_item
)
{
vlc_bool_t
b_play
=
var_CreateGetBool
(
p_demux
,
"playlist-autostart"
);
if
(
b_play
&&
p_playlist
->
status
.
p_item
&&
p_playlist
->
status
.
p_item
->
p_input
==
input_GetItem
((
input_thread_t
*
)
p_demux
->
p_parent
))
{
msg_Dbg
(
p_playlist
,
"starting playlist playback"
);
*
pp_item
=
p_playlist
->
status
.
p_item
;
b_play
=
VLC_TRUE
;
}
else
{
input_item_t
*
p_current
=
input_GetItem
(
(
input_thread_t
*
)
p_demux
->
p_parent
);
*
pp_item
=
playlist_ItemGetByInput
(
p_playlist
,
p_current
,
VLC_FALSE
);
if
(
!*
pp_item
)
{
msg_Dbg
(
p_playlist
,
"unable to find item in playlist"
);
}
msg_Dbg
(
p_playlist
,
"not starting playlist playback"
);
b_play
=
VLC_FALSE
;
}
return
b_play
;
input_thread_t
*
p_input
=
(
input_thread_t
*
)
vlc_object_find
(
p_demux
,
VLC_OBJECT_INPUT
,
FIND_PARENT
);
vlc_bool_t
b_play
=
var_CreateGetBool
(
p_demux
,
"playlist-autostart"
);
*
pp_item
=
NULL
;
if
(
p_input
)
{
if
(
b_play
&&
p_playlist
->
status
.
p_item
&&
p_playlist
->
status
.
p_item
->
p_input
==
input_GetItem
(
p_input
)
)
{
msg_Dbg
(
p_playlist
,
"starting playlist playback"
);
*
pp_item
=
p_playlist
->
status
.
p_item
;
b_play
=
VLC_TRUE
;
}
else
{
input_item_t
*
p_current
=
input_GetItem
(
p_input
);
*
pp_item
=
playlist_ItemGetByInput
(
p_playlist
,
p_current
,
VLC_FALSE
);
if
(
!*
pp_item
)
msg_Dbg
(
p_playlist
,
"unable to find item in playlist"
);
msg_Dbg
(
p_playlist
,
"not starting playlist playback"
);
b_play
=
VLC_FALSE
;
}
vlc_object_release
(
p_input
);
}
return
b_play
;
}
modules/demux/ogg.c
View file @
e86b6a0a
...
...
@@ -179,6 +179,7 @@ static void Ogg_ReadAnnodexHeader( vlc_object_t *, logical_stream_t *, ogg_packe
static
int
Open
(
vlc_object_t
*
p_this
)
{
demux_t
*
p_demux
=
(
demux_t
*
)
p_this
;
input_thread_t
*
p_input
;
demux_sys_t
*
p_sys
;
uint8_t
*
p_peek
;
...
...
@@ -203,17 +204,20 @@ static int Open( vlc_object_t * p_this )
p_sys
->
i_eos
=
0
;
if
(
((
input_thread_t
*
)(
p_demux
->
p_parent
))
->
b_preparsing
==
VLC_TRUE
)
p_input
=
(
input_thread_t
*
)
vlc_object_find
(
p_demux
,
VLC_OBJECT_INPUT
,
FIND_PARENT
);
if
(
p_input
&&
p_input
->
b_preparsing
)
{
module_t
*
p_meta
=
module_Need
(
p_demux
,
"meta reader"
,
NULL
,
0
);
if
(
p_meta
)
{
vlc_meta_Merge
(
input_GetItem
((
input_thread_t
*
)(
p_demux
->
p_parent
))
->
p_meta
,
(
vlc_meta_t
*
)(
p_demux
->
p_private
)
);
vlc_meta_Merge
(
input_GetItem
(
p_input
)
->
p_meta
,
(
vlc_meta_t
*
)(
p_demux
->
p_private
)
);
module_Unneed
(
p_demux
,
p_meta
);
}
vlc_object_release
(
p_input
);
return
VLC_SUCCESS
;
}
if
(
p_input
)
vlc_object_release
(
p_input
);
/* Initialize the Ogg physical bitstream parser */
ogg_sync_init
(
&
p_sys
->
oy
);
...
...
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