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
fe19e10c
Commit
fe19e10c
authored
May 20, 2009
by
Sébastien Escudier
Committed by
Rémi Denis-Courmont
May 20, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Free rtsp commands on close
Signed-off-by:
Rémi Denis-Courmont
<
remi@remlab.net
>
parent
60ce39b7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
11 deletions
+21
-11
modules/misc/rtsp.c
modules/misc/rtsp.c
+21
-11
No files found.
modules/misc/rtsp.c
View file @
fe19e10c
...
...
@@ -221,6 +221,17 @@ typedef enum
RTSP_CMD_TYPE_FORWARD
,
}
rtsp_cmd_type_t
;
/* */
typedef
struct
{
int
i_type
;
int
i_media_id
;
//vod_media_t *p_media;
char
*
psz_session
;
char
*
psz_arg
;
double
f_arg
;
}
rtsp_cmd_t
;
static
vod_media_t
*
MediaNew
(
vod_t
*
,
const
char
*
,
input_item_t
*
);
static
void
MediaDel
(
vod_t
*
,
vod_media_t
*
);
static
int
MediaAddES
(
vod_t
*
,
vod_media_t
*
,
es_format_t
*
);
...
...
@@ -337,12 +348,22 @@ static void Close( vlc_object_t * p_this )
{
vod_t
*
p_vod
=
(
vod_t
*
)
p_this
;
vod_sys_t
*
p_sys
=
p_vod
->
p_sys
;
block_t
*
p_block_cmd
;
rtsp_cmd_t
cmd
;
/* Stop command thread */
vlc_object_kill
(
p_vod
);
CommandPush
(
p_vod
,
RTSP_CMD_TYPE_NONE
,
NULL
,
NULL
,
0
.
0
,
NULL
);
vlc_thread_join
(
p_vod
);
while
(
block_FifoCount
(
p_sys
->
p_fifo_cmd
)
>
0
)
{
p_block_cmd
=
block_FifoGet
(
p_sys
->
p_fifo_cmd
);
memcpy
(
&
cmd
,
p_block_cmd
->
p_buffer
,
sizeof
(
cmd
)
);
block_Release
(
p_block_cmd
);
free
(
cmd
.
psz_session
);
free
(
cmd
.
psz_arg
);
}
block_FifoRelease
(
p_sys
->
p_fifo_cmd
);
httpd_HostDelete
(
p_sys
->
p_rtsp_host
);
...
...
@@ -780,17 +801,6 @@ static void MediaDelES( vod_t *p_vod, vod_media_t *p_media, es_format_t *p_fmt)
free
(
p_es
);
}
/* */
typedef
struct
{
int
i_type
;
int
i_media_id
;
//vod_media_t *p_media;
char
*
psz_session
;
char
*
psz_arg
;
double
f_arg
;
}
rtsp_cmd_t
;
static
void
CommandPush
(
vod_t
*
p_vod
,
rtsp_cmd_type_t
i_type
,
vod_media_t
*
p_media
,
const
char
*
psz_session
,
double
f_arg
,
const
char
*
psz_arg
)
{
...
...
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