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
29a03bfd
Commit
29a03bfd
authored
Aug 06, 2006
by
Clément Stenac
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix deletion of items when changing them to nodes
parent
6bdb92a0
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
15 additions
and
11 deletions
+15
-11
modules/demux/playlist/m3u.c
modules/demux/playlist/m3u.c
+2
-2
modules/demux/playlist/shoutcast.c
modules/demux/playlist/shoutcast.c
+1
-1
modules/services_discovery/shout.c
modules/services_discovery/shout.c
+6
-1
src/playlist/item.c
src/playlist/item.c
+6
-7
No files found.
modules/demux/playlist/m3u.c
View file @
29a03bfd
...
@@ -55,7 +55,7 @@ int E_(Import_M3U)( vlc_object_t *p_this )
...
@@ -55,7 +55,7 @@ int E_(Import_M3U)( vlc_object_t *p_this )
demux_t
*
p_demux
=
(
demux_t
*
)
p_this
;
demux_t
*
p_demux
=
(
demux_t
*
)
p_this
;
uint8_t
*
p_peek
;
uint8_t
*
p_peek
;
CHECK_PEEK
(
p_peek
,
8
);
CHECK_PEEK
(
p_peek
,
8
);
if
(
POKE
(
p_peek
,
"#EXTM3U"
,
7
)
||
POKE
(
p_peek
,
"RTSPtext"
,
8
)
||
if
(
POKE
(
p_peek
,
"#EXTM3U"
,
7
)
||
POKE
(
p_peek
,
"RTSPtext"
,
8
)
||
isExtension
(
p_demux
,
".m3u"
)
||
isExtension
(
p_demux
,
".vlc"
)
||
isExtension
(
p_demux
,
".m3u"
)
||
isExtension
(
p_demux
,
".vlc"
)
||
/* A .ram file can contain a single rtsp link */
/* A .ram file can contain a single rtsp link */
...
@@ -66,7 +66,7 @@ int E_(Import_M3U)( vlc_object_t *p_this )
...
@@ -66,7 +66,7 @@ int E_(Import_M3U)( vlc_object_t *p_this )
}
}
else
else
return
VLC_EGENERIC
;
return
VLC_EGENERIC
;
STANDARD_DEMUX_INIT_MSG
(
"found valid M3U playlist"
);
STANDARD_DEMUX_INIT_MSG
(
"found valid M3U playlist"
);
p_demux
->
p_sys
->
psz_prefix
=
E_
(
FindPrefix
)(
p_demux
);
p_demux
->
p_sys
->
psz_prefix
=
E_
(
FindPrefix
)(
p_demux
);
...
...
modules/demux/playlist/shoutcast.c
View file @
29a03bfd
...
@@ -71,7 +71,7 @@ int E_(Import_Shoutcast)( vlc_object_t *p_this )
...
@@ -71,7 +71,7 @@ int E_(Import_Shoutcast)( vlc_object_t *p_this )
if
(
!
isDemux
(
p_demux
,
"shout-winamp"
)
)
if
(
!
isDemux
(
p_demux
,
"shout-winamp"
)
)
return
VLC_EGENERIC
;
return
VLC_EGENERIC
;
STANDARD_DEMUX_INIT_MSG
(
"using shoutcast playlist reader"
);
STANDARD_DEMUX_INIT_MSG
(
"using shoutcast playlist reader"
);
p_demux
->
p_sys
->
p_playlist
=
NULL
;
p_demux
->
p_sys
->
p_playlist
=
NULL
;
p_demux
->
p_sys
->
p_xml
=
NULL
;
p_demux
->
p_sys
->
p_xml
=
NULL
;
...
...
modules/services_discovery/shout.c
View file @
29a03bfd
...
@@ -154,13 +154,18 @@ static int Open( vlc_object_t *p_this, int i_type )
...
@@ -154,13 +154,18 @@ static int Open( vlc_object_t *p_this, int i_type )
0
,
NULL
,
-
1
);
0
,
NULL
,
-
1
);
break
;
break
;
}
}
/* TODO FLAGS */
p_sys
->
p_node_cat
=
playlist_NodeAddInput
(
p_playlist
,
p_sys
->
p_input
,
p_sys
->
p_node_cat
=
playlist_NodeAddInput
(
p_playlist
,
p_sys
->
p_input
,
p_playlist
->
p_root_category
,
p_playlist
->
p_root_category
,
PLAYLIST_APPEND
,
PLAYLIST_END
);
PLAYLIST_APPEND
,
PLAYLIST_END
);
p_sys
->
p_node_one
=
playlist_NodeAddInput
(
p_playlist
,
p_sys
->
p_input
,
p_sys
->
p_node_one
=
playlist_NodeAddInput
(
p_playlist
,
p_sys
->
p_input
,
p_playlist
->
p_root_onelevel
,
p_playlist
->
p_root_onelevel
,
PLAYLIST_APPEND
,
PLAYLIST_END
);
PLAYLIST_APPEND
,
PLAYLIST_END
);
p_sys
->
p_node_cat
->
i_flags
|=
PLAYLIST_RO_FLAG
;
p_sys
->
p_node_cat
->
i_flags
|=
PLAYLIST_SKIP_FLAG
;
p_sys
->
p_node_one
->
i_flags
|=
PLAYLIST_RO_FLAG
;
p_sys
->
p_node_one
->
i_flags
|=
PLAYLIST_SKIP_FLAG
;
p_sys
->
p_node_one
->
p_input
->
i_id
=
p_sys
->
p_node_cat
->
p_input
->
i_id
;
val
.
b_bool
=
VLC_TRUE
;
val
.
b_bool
=
VLC_TRUE
;
var_Set
(
p_playlist
,
"intf-change"
,
val
);
var_Set
(
p_playlist
,
"intf-change"
,
val
);
...
...
src/playlist/item.c
View file @
29a03bfd
...
@@ -137,14 +137,16 @@ int playlist_DeleteFromInput( playlist_t *p_playlist, int i_input_id,
...
@@ -137,14 +137,16 @@ int playlist_DeleteFromInput( playlist_t *p_playlist, int i_input_id,
p_root
->
pp_children
[
i
]
->
p_input
->
i_id
==
i_input_id
)
p_root
->
pp_children
[
i
]
->
p_input
->
i_id
==
i_input_id
)
{
{
DeleteInner
(
p_playlist
,
p_root
->
pp_children
[
i
],
b_do_stop
);
DeleteInner
(
p_playlist
,
p_root
->
pp_children
[
i
],
b_do_stop
);
return
VLC_SUCCESS
;
}
}
else
if
(
p_root
->
pp_children
[
i
]
->
i_children
>=
0
)
else
if
(
p_root
->
pp_children
[
i
]
->
i_children
>=
0
)
{
{
return
playlist_DeleteFromInput
(
p_playlist
,
i_input_id
,
int
i_ret
=
playlist_DeleteFromInput
(
p_playlist
,
i_input_id
,
p_root
->
pp_children
[
i
],
b_do_stop
);
p_root
->
pp_children
[
i
],
b_do_stop
);
if
(
i_ret
==
VLC_SUCCESS
)
return
VLC_SUCCESS
;
}
}
}
}
return
-
1
;
return
VLC_EGENERIC
;
}
}
/** Remove a playlist item from the playlist, given its id */
/** Remove a playlist item from the playlist, given its id */
...
@@ -389,7 +391,7 @@ playlist_item_t *playlist_ItemToNode( playlist_t *p_playlist,
...
@@ -389,7 +391,7 @@ playlist_item_t *playlist_ItemToNode( playlist_t *p_playlist,
*/
*/
/* Fast track the media library, no time to loose */
/* Fast track the media library, no time to loose */
if
(
p_item
==
p_playlist
->
p_ml_category
)
if
(
p_item
==
p_playlist
->
p_ml_category
)
return
p_item
;
return
p_item
;
/** \todo First look if we don't already have it */
/** \todo First look if we don't already have it */
...
@@ -409,7 +411,7 @@ playlist_item_t *playlist_ItemToNode( playlist_t *p_playlist,
...
@@ -409,7 +411,7 @@ playlist_item_t *playlist_ItemToNode( playlist_t *p_playlist,
}
}
else
else
{
{
playlist_DeleteFromInput
(
p_playlist
,
p_item
->
p_input
->
i_id
,
playlist_DeleteFromInput
(
p_playlist
,
p_item
_in_one
->
p_input
->
i_id
,
p_playlist
->
p_root_onelevel
,
VLC_FALSE
);
p_playlist
->
p_root_onelevel
,
VLC_FALSE
);
}
}
var_SetInteger
(
p_playlist
,
"item-change"
,
p_item
->
p_input
->
i_id
);
var_SetInteger
(
p_playlist
,
"item-change"
,
p_item
->
p_input
->
i_id
);
...
@@ -650,9 +652,6 @@ int DeleteInner( playlist_t * p_playlist, playlist_item_t *p_item,
...
@@ -650,9 +652,6 @@ int DeleteInner( playlist_t * p_playlist, playlist_item_t *p_item,
int
i_id
=
p_item
->
i_id
;
int
i_id
=
p_item
->
i_id
;
vlc_bool_t
b_flag
=
VLC_FALSE
;
vlc_bool_t
b_flag
=
VLC_FALSE
;
//fprintf( stderr, "Deleting item %i - %s\n", i_id,
// p_item->p_input->psz_name );
if
(
p_item
->
i_children
>
-
1
)
if
(
p_item
->
i_children
>
-
1
)
{
{
return
playlist_NodeDelete
(
p_playlist
,
p_item
,
VLC_TRUE
,
VLC_FALSE
);
return
playlist_NodeDelete
(
p_playlist
,
p_item
,
VLC_TRUE
,
VLC_FALSE
);
...
...
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