Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
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
Commits
8f973a0b
Commit
8f973a0b
authored
May 31, 2006
by
Clément Stenac
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix playlist crasher and simplify a few things
(Remove ITEMPLAY method, which had become redundant)
parent
40d23030
Changes
17
Show whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
54 additions
and
62 deletions
+54
-62
include/vlc_common.h
include/vlc_common.h
+2
-5
modules/access/cdda.c
modules/access/cdda.c
+1
-2
modules/access/cdda/info.c
modules/access/cdda/info.c
+1
-1
modules/control/hotkeys.c
modules/control/hotkeys.c
+1
-1
modules/control/http/macro.c
modules/control/http/macro.c
+2
-1
modules/control/http/rpn.c
modules/control/http/rpn.c
+2
-1
modules/demux/playlist/playlist.h
modules/demux/playlist/playlist.h
+1
-1
modules/gui/macosx/playlist.m
modules/gui/macosx/playlist.m
+3
-3
modules/gui/macosx/wizard.m
modules/gui/macosx/wizard.m
+2
-1
modules/gui/ncurses.c
modules/gui/ncurses.c
+2
-2
modules/gui/qt4/main_interface.cpp
modules/gui/qt4/main_interface.cpp
+4
-0
modules/gui/skins2/vars/playtree.cpp
modules/gui/skins2/vars/playtree.cpp
+1
-2
modules/gui/wince/open.cpp
modules/gui/wince/open.cpp
+7
-3
modules/gui/wxwidgets/dialogs/playlist.cpp
modules/gui/wxwidgets/dialogs/playlist.cpp
+3
-4
modules/video_filter/motiondetect.c
modules/video_filter/motiondetect.c
+1
-1
src/playlist/control.c
src/playlist/control.c
+19
-33
src/playlist/tree.c
src/playlist/tree.c
+2
-1
No files found.
include/vlc_common.h
View file @
8f973a0b
...
@@ -220,14 +220,11 @@ typedef struct msg_subscription_t msg_subscription_t;
...
@@ -220,14 +220,11 @@ typedef struct msg_subscription_t msg_subscription_t;
typedef
enum
{
typedef
enum
{
PLAYLIST_PLAY
,
/**< No arg. res=can fail*/
PLAYLIST_PLAY
,
/**< No arg. res=can fail*/
PLAYLIST_AUTOPLAY
,
/**< No arg. res=cant fail*/
PLAYLIST_AUTOPLAY
,
/**< No arg. res=cant fail*/
PLAYLIST_VIEWPLAY
,
/**< arg1= int, arg2= playlist_item_t*,*/
PLAYLIST_VIEWPLAY
,
/**< arg1= playlist_item_t*,*/
/** arg3 = playlist_item_t* , res=can fail */
/** arg2 = playlist_item_t* , res=can fail */
PLAYLIST_ITEMPLAY
,
/** <arg1 = playlist_item_t * , res=can fail */
PLAYLIST_PAUSE
,
/**< No arg res=can fail*/
PLAYLIST_PAUSE
,
/**< No arg res=can fail*/
PLAYLIST_STOP
,
/**< No arg res=can fail*/
PLAYLIST_STOP
,
/**< No arg res=can fail*/
PLAYLIST_SKIP
,
/**< arg1=int, res=can fail*/
PLAYLIST_SKIP
,
/**< arg1=int, res=can fail*/
PLAYLIST_GOTO
,
/**< arg1=int res=can fail */
PLAYLIST_VIEWGOTO
/**< arg1=int res=can fail */
}
playlist_command_t
;
}
playlist_command_t
;
...
...
modules/access/cdda.c
View file @
8f973a0b
...
@@ -291,9 +291,8 @@ static int Open( vlc_object_t *p_this )
...
@@ -291,9 +291,8 @@ static int Open( vlc_object_t *p_this )
if
(
b_play
)
if
(
b_play
)
{
{
playlist_Control
(
p_playlist
,
PLAYLIST_VIEWPLAY
,
1242
,
playlist_Control
(
p_playlist
,
PLAYLIST_VIEWPLAY
,
p_playlist
->
request
.
p_node
,
NULL
);
p_playlist
->
request
.
p_node
,
NULL
);
// playlist_Play( p_playlist );
}
}
if
(
p_playlist
)
vlc_object_release
(
p_playlist
);
if
(
p_playlist
)
vlc_object_release
(
p_playlist
);
...
...
modules/access/cdda/info.c
View file @
8f973a0b
...
@@ -1037,7 +1037,7 @@ CDDAFixupPlaylist( access_t *p_access, cdda_data_t *p_cdda,
...
@@ -1037,7 +1037,7 @@ CDDAFixupPlaylist( access_t *p_access, cdda_data_t *p_cdda,
if
(
b_play
)
if
(
b_play
)
{
{
playlist_Control
(
p_playlist
,
PLAYLIST_VIEWPLAY
,
0
,
playlist_Control
(
p_playlist
,
PLAYLIST_VIEWPLAY
,
p_playlist
->
status
.
p_item
,
NULL
);
p_playlist
->
status
.
p_item
,
NULL
);
}
}
...
...
modules/control/hotkeys.c
View file @
8f973a0b
...
@@ -921,7 +921,7 @@ static void PlayBookmark( intf_thread_t *p_intf, int i_num )
...
@@ -921,7 +921,7 @@ static void PlayBookmark( intf_thread_t *p_intf, int i_num )
if
(
!
strcmp
(
psz_bookmark
,
if
(
!
strcmp
(
psz_bookmark
,
p_playlist
->
pp_items
[
i
]
->
p_input
->
psz_uri
)
)
p_playlist
->
pp_items
[
i
]
->
p_input
->
psz_uri
)
)
{
{
playlist_LockControl
(
p_playlist
,
PLAYLIST_
ITEMPLAY
,
playlist_LockControl
(
p_playlist
,
PLAYLIST_
VIEWPLAY
,
NULL
,
p_playlist
->
pp_items
[
i
]
);
p_playlist
->
pp_items
[
i
]
);
break
;
break
;
}
}
...
...
modules/control/http/macro.c
View file @
8f973a0b
...
@@ -195,7 +195,8 @@ void E_(MacroDo)( httpd_file_sys_t *p_args,
...
@@ -195,7 +195,8 @@ void E_(MacroDo)( httpd_file_sys_t *p_args,
msg_Dbg
(
p_intf
,
"requested playlist play"
);
msg_Dbg
(
p_intf
,
"requested playlist play"
);
break
;
break
;
}
}
playlist_Control
(
p_sys
->
p_playlist
,
PLAYLIST_ITEMPLAY
,
playlist_Control
(
p_sys
->
p_playlist
,
PLAYLIST_VIEWPLAY
,
NULL
,
playlist_ItemGetById
(
p_sys
->
p_playlist
,
playlist_ItemGetById
(
p_sys
->
p_playlist
,
i_item
)
);
i_item
)
);
msg_Dbg
(
p_intf
,
"requested playlist item: %i"
,
i_item
);
msg_Dbg
(
p_intf
,
"requested playlist item: %i"
,
i_item
);
...
...
modules/control/http/rpn.c
View file @
8f973a0b
...
@@ -490,7 +490,8 @@ void E_(EvaluateRPN)( intf_thread_t *p_intf, mvar_t *vars,
...
@@ -490,7 +490,8 @@ void E_(EvaluateRPN)( intf_thread_t *p_intf, mvar_t *vars,
int
i_id
=
E_
(
SSPopN
)(
st
,
vars
);
int
i_id
=
E_
(
SSPopN
)(
st
,
vars
);
int
i_ret
;
int
i_ret
;
i_ret
=
playlist_Control
(
p_sys
->
p_playlist
,
PLAYLIST_ITEMPLAY
,
i_ret
=
playlist_Control
(
p_sys
->
p_playlist
,
PLAYLIST_VIEWPLAY
,
NULL
,
playlist_ItemGetById
(
p_sys
->
p_playlist
,
playlist_ItemGetById
(
p_sys
->
p_playlist
,
i_id
)
);
i_id
)
);
msg_Dbg
(
p_intf
,
"requested playlist item: %i"
,
i_id
);
msg_Dbg
(
p_intf
,
"requested playlist item: %i"
,
i_id
);
...
...
modules/demux/playlist/playlist.h
View file @
8f973a0b
...
@@ -83,7 +83,7 @@ void E_(Close_Shoutcast) ( vlc_object_t * );
...
@@ -83,7 +83,7 @@ void E_(Close_Shoutcast) ( vlc_object_t * );
if( b_play && p_playlist->status.p_item && \
if( b_play && p_playlist->status.p_item && \
p_playlist->status.p_item->i_children > 0 ) \
p_playlist->status.p_item->i_children > 0 ) \
{ \
{ \
playlist_Control( p_playlist, PLAYLIST_VIEWPLAY,
1242,
\
playlist_Control( p_playlist, PLAYLIST_VIEWPLAY, \
p_playlist->status.p_item, NULL ); \
p_playlist->status.p_item, NULL ); \
} \
} \
vlc_object_release( p_playlist );
vlc_object_release( p_playlist );
...
...
modules/gui/macosx/playlist.m
View file @
8f973a0b
...
@@ -788,7 +788,7 @@ belongs to an Apple hidden private API, and then can "disapear" at any time*/
...
@@ -788,7 +788,7 @@ belongs to an Apple hidden private API, and then can "disapear" at any time*/
p_item
=
NULL
;
p_item
=
NULL
;
}
}
}
}
playlist_Control
(
p_playlist
,
PLAYLIST_VIEWPLAY
,
0
,
p_node
,
p_item
);
playlist_Control
(
p_playlist
,
PLAYLIST_VIEWPLAY
,
p_node
,
p_item
);
}
}
vlc_object_release
(
p_playlist
);
vlc_object_release
(
p_playlist
);
}
}
...
@@ -1086,7 +1086,7 @@ belongs to an Apple hidden private API, and then can "disapear" at any time*/
...
@@ -1086,7 +1086,7 @@ belongs to an Apple hidden private API, and then can "disapear" at any time*/
{
{
playlist_item_t
*
p_item
;
playlist_item_t
*
p_item
;
p_item
=
playlist_ItemGetByInput
(
p_playlist
,
p_input
);
p_item
=
playlist_ItemGetByInput
(
p_playlist
,
p_input
);
playlist_Control
(
p_playlist
,
PLAYLIST_
ITEMPLAY
,
p_item
);
playlist_Control
(
p_playlist
,
PLAYLIST_
VIEWPLAY
,
NULL
,
p_item
);
}
}
else
else
{
{
...
@@ -1133,7 +1133,7 @@ belongs to an Apple hidden private API, and then can "disapear" at any time*/
...
@@ -1133,7 +1133,7 @@ belongs to an Apple hidden private API, and then can "disapear" at any time*/
{
{
playlist_item_t
*
p_item
;
playlist_item_t
*
p_item
;
p_item
=
playlist_ItemGetByInput
(
p_playlist
,
p_input
);
p_item
=
playlist_ItemGetByInput
(
p_playlist
,
p_input
);
playlist_Control
(
p_playlist
,
PLAYLIST_
ITEMPLAY
,
p_item
);
playlist_Control
(
p_playlist
,
PLAYLIST_
VIEWPLAY
,
NULL
,
p_item
);
}
}
else
else
{
{
...
...
modules/gui/macosx/wizard.m
View file @
8f973a0b
...
@@ -1322,7 +1322,8 @@ static VLCWizard *_o_sharedInstance = nil;
...
@@ -1322,7 +1322,8 @@ static VLCWizard *_o_sharedInstance = nil;
{
{
/* play the first item and add the others afterwards */
/* play the first item and add the others afterwards */
playlist_item_t
*
p_item
=
playlist_ItemGetByInput
(
p_playlist
,
p_input
);
playlist_item_t
*
p_item
=
playlist_ItemGetByInput
(
p_playlist
,
p_input
);
playlist_Control
(
p_playlist
,
PLAYLIST_ITEMPLAY
,
p_item
);
playlist_Control
(
p_playlist
,
PLAYLIST_VIEWPLAY
,
NULL
,
p_item
);
}
}
x
+=
1
;
x
+=
1
;
...
...
modules/gui/ncurses.c
View file @
8f973a0b
...
@@ -565,13 +565,13 @@ static int HandleKey( intf_thread_t *p_intf, int i_key )
...
@@ -565,13 +565,13 @@ static int HandleKey( intf_thread_t *p_intf, int i_key )
if
(
p_sys
->
pp_plist
[
p_sys
->
i_box_plidx
]
->
p_item
->
i_children
if
(
p_sys
->
pp_plist
[
p_sys
->
i_box_plidx
]
->
p_item
->
i_children
==
-
1
)
==
-
1
)
{
{
playlist_Control
(
p_sys
->
p_playlist
,
PLAYLIST_ITEMPLAY
,
playlist_Control
(
p_sys
->
p_playlist
,
PLAYLIST_VIEWPLAY
,
NULL
,
p_sys
->
pp_plist
[
p_sys
->
i_box_plidx
]
->
p_item
);
p_sys
->
pp_plist
[
p_sys
->
i_box_plidx
]
->
p_item
);
}
}
else
else
{
{
playlist_Control
(
p_sys
->
p_playlist
,
PLAYLIST_VIEWPLAY
,
playlist_Control
(
p_sys
->
p_playlist
,
PLAYLIST_VIEWPLAY
,
p_sys
->
i_current_view
,
p_sys
->
pp_plist
[
p_sys
->
i_box_plidx
]
->
p_item
,
p_sys
->
pp_plist
[
p_sys
->
i_box_plidx
]
->
p_item
,
NULL
);
NULL
);
}
}
...
...
modules/gui/qt4/main_interface.cpp
View file @
8f973a0b
...
@@ -47,6 +47,10 @@ void MainInterface::init()
...
@@ -47,6 +47,10 @@ void MainInterface::init()
QObject
::
connect
(
this
,
SIGNAL
(
inputChanged
(
input_thread_t
*
)
),
QObject
::
connect
(
this
,
SIGNAL
(
inputChanged
(
input_thread_t
*
)
),
main_input_manager
,
SLOT
(
setInput
(
input_thread_t
*
)
)
);
main_input_manager
,
SLOT
(
setInput
(
input_thread_t
*
)
)
);
/* Connect the slider and the input manager */
// both ways
/* Connect the display and the input manager */
}
}
MainInterface
::~
MainInterface
()
MainInterface
::~
MainInterface
()
...
...
modules/gui/skins2/vars/playtree.cpp
View file @
8f973a0b
...
@@ -119,8 +119,7 @@ void Playtree::action( VarTree *pItem )
...
@@ -119,8 +119,7 @@ void Playtree::action( VarTree *pItem )
if
(
p_parent
)
if
(
p_parent
)
{
{
playlist_Control
(
m_pPlaylist
,
PLAYLIST_VIEWPLAY
,
1242
,
playlist_Control
(
m_pPlaylist
,
PLAYLIST_VIEWPLAY
,
p_parent
,
p_item
);
p_parent
,
p_item
);
}
}
vlc_mutex_unlock
(
&
m_pPlaylist
->
object_lock
);
vlc_mutex_unlock
(
&
m_pPlaylist
->
object_lock
);
}
}
...
...
modules/gui/wince/open.cpp
View file @
8f973a0b
...
@@ -636,12 +636,16 @@ void OpenDialog::OnOk()
...
@@ -636,12 +636,16 @@ void OpenDialog::OnOk()
}
}
}
}
playlist_AddItem
(
p_playlist
,
p_item
,
PLAYLIST_APPEND
,
PLAYLIST_END
);
if
(
b_start
)
if
(
b_start
)
{
{
playlist_Control
(
p_playlist
,
PLAYLIST_ITEMPLAY
,
p_item
);
playlist_AddItem
(
p_playlist
,
p_item
,
PLAYLIST_APPEND
|
PLAYLIST_GO
,
PLAYLIST_END
);
}
else
{
playlist_AddItem
(
p_playlist
,
p_item
,
PLAYLIST_APPEND
,
PLAYLIST_END
);
}
}
}
}
...
...
modules/gui/wxwidgets/dialogs/playlist.cpp
View file @
8f973a0b
...
@@ -1124,8 +1124,7 @@ void Playlist::OnActivateItem( wxTreeEvent& event )
...
@@ -1124,8 +1124,7 @@ void Playlist::OnActivateItem( wxTreeEvent& event )
if
(
p_parent
)
if
(
p_parent
)
{
{
playlist_Control
(
p_playlist
,
PLAYLIST_VIEWPLAY
,
1242
,
playlist_Control
(
p_playlist
,
PLAYLIST_VIEWPLAY
,
p_parent
,
p_item
);
p_parent
,
p_item
);
}
}
UnlockPlaylist
(
p_intf
->
p_sys
,
p_playlist
);
UnlockPlaylist
(
p_intf
->
p_sys
,
p_playlist
);
}
}
...
@@ -1522,8 +1521,8 @@ void Playlist::OnPopupPlay( wxCommandEvent& event )
...
@@ -1522,8 +1521,8 @@ void Playlist::OnPopupPlay( wxCommandEvent& event )
if
(
p_popup_parent
)
if
(
p_popup_parent
)
{
{
playlist_Control
(
p_playlist
,
PLAYLIST_VIEWPLAY
,
1242
,
playlist_Control
(
p_playlist
,
PLAYLIST_VIEWPLAY
,
p_popup_parent
,
p_popup_
parent
,
p_popup_
item
);
p_popup_item
);
}
}
UnlockPlaylist
(
p_intf
->
p_sys
,
p_playlist
);
UnlockPlaylist
(
p_intf
->
p_sys
,
p_playlist
);
}
}
...
...
modules/video_filter/motiondetect.c
View file @
8f973a0b
...
@@ -407,7 +407,7 @@ static void MotionDetect( vout_thread_t *p_vout, picture_t *p_inpic,
...
@@ -407,7 +407,7 @@ static void MotionDetect( vout_thread_t *p_vout, picture_t *p_inpic,
msg_Dbg
(
p_vout
,
"Area(%d) matched, going to %s
\n
"
,
i_area
,
msg_Dbg
(
p_vout
,
"Area(%d) matched, going to %s
\n
"
,
i_area
,
pp_curent_area
->
psz_mrl
);
pp_curent_area
->
psz_mrl
);
playlist_Control
(
p_vout
->
p_sys
->
p_playlist
,
playlist_Control
(
p_vout
->
p_sys
->
p_playlist
,
PLAYLIST_
ITEMPLAY
,
p_item
);
PLAYLIST_
VIEWPLAY
,
NULL
,
p_item
);
pp_curent_area
->
i_matches
=
0
;
pp_curent_area
->
i_matches
=
0
;
}
}
}
}
...
...
src/playlist/control.c
View file @
8f973a0b
...
@@ -24,6 +24,7 @@
...
@@ -24,6 +24,7 @@
#include <vlc/vlc.h>
#include <vlc/vlc.h>
#include <vlc/input.h>
#include <vlc/input.h>
#include "vlc_playlist.h"
#include "vlc_playlist.h"
#include <assert.h>
/*****************************************************************************
/*****************************************************************************
* Local prototypes
* Local prototypes
...
@@ -96,31 +97,15 @@ int PlaylistVAControl( playlist_t * p_playlist, int i_query, va_list args )
...
@@ -96,31 +97,15 @@ int PlaylistVAControl( playlist_t * p_playlist, int i_query, va_list args )
p_playlist
->
request
.
p_item
=
NULL
;
p_playlist
->
request
.
p_item
=
NULL
;
break
;
break
;
case
PLAYLIST_ITEMPLAY
:
// Node can be null, it will keep the same. Use with care ...
p_item
=
(
playlist_item_t
*
)
va_arg
(
args
,
playlist_item_t
*
);
// Item null = take the first child of node
if
(
p_item
==
NULL
||
p_item
->
p_input
->
psz_uri
==
NULL
)
return
VLC_EGENERIC
;
p_playlist
->
request
.
i_status
=
PLAYLIST_RUNNING
;
p_playlist
->
request
.
i_skip
=
0
;
p_playlist
->
request
.
b_request
=
VLC_TRUE
;
p_playlist
->
request
.
p_item
=
p_item
;
p_playlist
->
request
.
p_node
=
p_playlist
->
status
.
p_node
;
break
;
case
PLAYLIST_VIEWPLAY
:
case
PLAYLIST_VIEWPLAY
:
i_view
=
(
int
)
va_arg
(
args
,
playlist_item_t
*
);
p_node
=
(
playlist_item_t
*
)
va_arg
(
args
,
playlist_item_t
*
);
p_node
=
(
playlist_item_t
*
)
va_arg
(
args
,
playlist_item_t
*
);
p_item
=
(
playlist_item_t
*
)
va_arg
(
args
,
playlist_item_t
*
);
p_item
=
(
playlist_item_t
*
)
va_arg
(
args
,
playlist_item_t
*
);
if
(
p_node
==
NULL
)
if
(
p_node
==
NULL
)
{
{
p_node
=
p_playlist
->
status
.
p_node
;
p_node
=
p_playlist
->
status
.
p_node
;
if
(
!
p_node
)
assert
(
p_node
);
{
p_playlist
->
status
.
i_status
=
PLAYLIST_STOPPED
;
p_playlist
->
request
.
b_request
=
VLC_TRUE
;
msg_Err
(
p_playlist
,
"null node"
);
return
VLC_SUCCESS
;
}
}
}
p_playlist
->
request
.
i_status
=
PLAYLIST_RUNNING
;
p_playlist
->
request
.
i_status
=
PLAYLIST_RUNNING
;
p_playlist
->
request
.
i_skip
=
0
;
p_playlist
->
request
.
i_skip
=
0
;
...
@@ -130,23 +115,27 @@ int PlaylistVAControl( playlist_t * p_playlist, int i_query, va_list args )
...
@@ -130,23 +115,27 @@ int PlaylistVAControl( playlist_t * p_playlist, int i_query, va_list args )
break
;
break
;
case
PLAYLIST_PLAY
:
case
PLAYLIST_PLAY
:
p_playlist
->
request
.
i_status
=
PLAYLIST_RUNNING
;
p_playlist
->
request
.
b_request
=
VLC_TRUE
;
if
(
p_playlist
->
p_input
)
if
(
p_playlist
->
p_input
)
{
{
val
.
i_int
=
PLAYING_S
;
val
.
i_int
=
PLAYING_S
;
var_Set
(
p_playlist
->
p_input
,
"state"
,
val
);
var_Set
(
p_playlist
->
p_input
,
"state"
,
val
);
break
;
break
;
}
}
else
{
p_playlist
->
request
.
i_status
=
PLAYLIST_RUNNING
;
p_playlist
->
request
.
b_request
=
VLC_TRUE
;
p_playlist
->
request
.
p_node
=
p_playlist
->
status
.
p_node
;
p_playlist
->
request
.
p_node
=
p_playlist
->
status
.
p_node
;
p_playlist
->
request
.
p_item
=
p_playlist
->
status
.
p_item
;
p_playlist
->
request
.
p_item
=
p_playlist
->
status
.
p_item
;
p_playlist
->
request
.
i_skip
=
0
;
p_playlist
->
request
.
i_skip
=
0
;
}
break
;
break
;
case
PLAYLIST_AUTOPLAY
:
case
PLAYLIST_AUTOPLAY
:
// AUTOPLAY is an ugly hack for initial status.
// Hopefully it will disappear
p_playlist
->
status
.
i_status
=
PLAYLIST_RUNNING
;
p_playlist
->
status
.
i_status
=
PLAYLIST_RUNNING
;
p_playlist
->
status
.
p_node
=
p_playlist
->
p_local_category
;
p_playlist
->
request
.
p_node
=
p_playlist
->
status
.
p_node
;
p_playlist
->
request
.
b_request
=
VLC_FALSE
;
p_playlist
->
request
.
b_request
=
VLC_FALSE
;
break
;
break
;
...
@@ -260,7 +249,6 @@ playlist_item_t * playlist_NextItem( playlist_t *p_playlist )
...
@@ -260,7 +249,6 @@ playlist_item_t * playlist_NextItem( playlist_t *p_playlist )
vlc_bool_t
b_playstop
=
var_GetBool
(
p_playlist
,
"play-and-stop"
);
vlc_bool_t
b_playstop
=
var_GetBool
(
p_playlist
,
"play-and-stop"
);
/* Handle quickly a few special cases */
/* Handle quickly a few special cases */
/* No items to play */
/* No items to play */
if
(
p_playlist
->
i_size
==
0
)
if
(
p_playlist
->
i_size
==
0
)
{
{
...
@@ -341,14 +329,12 @@ playlist_item_t * playlist_NextItem( playlist_t *p_playlist )
...
@@ -341,14 +329,12 @@ playlist_item_t * playlist_NextItem( playlist_t *p_playlist )
p_new
=
p_playlist
->
request
.
p_item
;
p_new
=
p_playlist
->
request
.
p_item
;
i_skip
=
p_playlist
->
request
.
i_skip
;
i_skip
=
p_playlist
->
request
.
i_skip
;
if
(
p_playlist
->
request
.
p_node
)
p_playlist
->
status
.
p_node
=
p_playlist
->
request
.
p_node
;
p_playlist
->
status
.
p_node
=
p_playlist
->
request
.
p_node
;
/* If we are asked for a node, take its first item */
/* If we are asked for a node, dont take it */
if
(
i_skip
==
0
&&
if
(
i_skip
==
0
&&
(
p_new
==
NULL
||
p_new
->
i_children
!=
-
1
)
)
(
p_new
==
NULL
||
p_new
->
i_children
!=
-
1
)
)
{
i_skip
++
;
i_skip
++
;
}
if
(
i_skip
>
0
)
if
(
i_skip
>
0
)
{
{
...
...
src/playlist/tree.c
View file @
8f973a0b
...
@@ -354,6 +354,8 @@ playlist_item_t *playlist_GetNextLeaf( playlist_t *p_playlist,
...
@@ -354,6 +354,8 @@ playlist_item_t *playlist_GetNextLeaf( playlist_t *p_playlist,
{
{
playlist_item_t
*
p_next
;
playlist_item_t
*
p_next
;
assert
(
p_root
&&
p_root
->
i_children
!=
-
1
);
#ifdef PLAYLIST_DEBUG
#ifdef PLAYLIST_DEBUG
if
(
p_item
!=
NULL
)
if
(
p_item
!=
NULL
)
msg_Dbg
(
p_playlist
,
"finding next of %s within %s"
,
msg_Dbg
(
p_playlist
,
"finding next of %s within %s"
,
...
@@ -363,7 +365,6 @@ playlist_item_t *playlist_GetNextLeaf( playlist_t *p_playlist,
...
@@ -363,7 +365,6 @@ playlist_item_t *playlist_GetNextLeaf( playlist_t *p_playlist,
p_root
->
p_input
->
psz_name
);
p_root
->
p_input
->
psz_name
);
#endif
#endif
assert
(
p_root
&&
p_root
->
i_children
!=
-
1
);
/* Now, walk the tree until we find a suitable next item */
/* Now, walk the tree until we find a suitable next item */
p_next
=
p_item
;
p_next
=
p_item
;
...
...
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