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
b9c13322
Commit
b9c13322
authored
Aug 23, 2004
by
Gildas Bazin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* src/video_output/vout_subpictures.c, video_output.c: fixed a crash with dvd menus.
parent
1e5b412a
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
30 additions
and
15 deletions
+30
-15
include/video_output.h
include/video_output.h
+1
-0
src/video_output/video_output.c
src/video_output/video_output.c
+4
-3
src/video_output/vout_subpictures.c
src/video_output/vout_subpictures.c
+25
-12
No files found.
include/video_output.h
View file @
b9c13322
...
@@ -278,6 +278,7 @@ VLC_EXPORT( void, __spu_DestroyRegion, ( vlc_object_t *, subpicture_region_t * )
...
@@ -278,6 +278,7 @@ VLC_EXPORT( void, __spu_DestroyRegion, ( vlc_object_t *, subpicture_region_t * )
void
vout_InitSPU
(
vout_thread_t
*
);
void
vout_InitSPU
(
vout_thread_t
*
);
void
vout_DestroySPU
(
vout_thread_t
*
);
void
vout_DestroySPU
(
vout_thread_t
*
);
void
vout_AttachSPU
(
vout_thread_t
*
,
vlc_bool_t
);
subpicture_t
*
vout_SortSubPictures
(
vout_thread_t
*
,
mtime_t
);
subpicture_t
*
vout_SortSubPictures
(
vout_thread_t
*
,
mtime_t
);
void
vout_RenderSubPictures
(
vout_thread_t
*
,
picture_t
*
,
void
vout_RenderSubPictures
(
vout_thread_t
*
,
picture_t
*
,
picture_t
*
,
subpicture_t
*
);
picture_t
*
,
subpicture_t
*
);
...
...
src/video_output/video_output.c
View file @
b9c13322
...
@@ -94,11 +94,12 @@ vout_thread_t * __vout_Request ( vlc_object_t *p_this, vout_thread_t *p_vout,
...
@@ -94,11 +94,12 @@ vout_thread_t * __vout_Request ( vlc_object_t *p_this, vout_thread_t *p_vout,
{
{
vlc_object_t
*
p_playlist
;
vlc_object_t
*
p_playlist
;
p_playlist
=
vlc_object_find
(
p_this
,
p_playlist
=
vlc_object_find
(
p_this
,
VLC_OBJECT_PLAYLIST
,
VLC_OBJECT_PLAYLIST
,
FIND_ANYWHERE
);
FIND_ANYWHERE
);
if
(
p_playlist
)
if
(
p_playlist
)
{
{
vout_AttachSPU
(
p_vout
,
VLC_FALSE
);
vlc_object_detach
(
p_vout
);
vlc_object_detach
(
p_vout
);
vlc_object_attach
(
p_vout
,
p_playlist
);
vlc_object_attach
(
p_vout
,
p_playlist
);
...
@@ -194,6 +195,7 @@ vout_thread_t * __vout_Request ( vlc_object_t *p_this, vout_thread_t *p_vout,
...
@@ -194,6 +195,7 @@ vout_thread_t * __vout_Request ( vlc_object_t *p_this, vout_thread_t *p_vout,
/* This video output is cool! Hijack it. */
/* This video output is cool! Hijack it. */
vlc_object_detach
(
p_vout
);
vlc_object_detach
(
p_vout
);
vlc_object_attach
(
p_vout
,
p_this
);
vlc_object_attach
(
p_vout
,
p_this
);
vout_AttachSPU
(
p_vout
,
VLC_TRUE
);
vlc_object_release
(
p_vout
);
vlc_object_release
(
p_vout
);
}
}
}
}
...
@@ -1420,4 +1422,3 @@ static int FilterCallback( vlc_object_t *p_this, char const *psz_cmd,
...
@@ -1420,4 +1422,3 @@ static int FilterCallback( vlc_object_t *p_this, char const *psz_cmd,
var_Set
(
p_vout
,
"intf-change"
,
val
);
var_Set
(
p_vout
,
"intf-change"
,
val
);
return
VLC_SUCCESS
;
return
VLC_SUCCESS
;
}
}
src/video_output/vout_subpictures.c
View file @
b9c13322
...
@@ -51,7 +51,6 @@ static void spu_del_buffer( filter_t *, subpicture_t * );
...
@@ -51,7 +51,6 @@ static void spu_del_buffer( filter_t *, subpicture_t * );
*/
*/
void
vout_InitSPU
(
vout_thread_t
*
p_vout
)
void
vout_InitSPU
(
vout_thread_t
*
p_vout
)
{
{
vlc_object_t
*
p_input
;
int
i_index
;
int
i_index
;
for
(
i_index
=
0
;
i_index
<
VOUT_MAX_SUBPICTURES
;
i_index
++
)
for
(
i_index
=
0
;
i_index
<
VOUT_MAX_SUBPICTURES
;
i_index
++
)
...
@@ -83,14 +82,7 @@ void vout_InitSPU( vout_thread_t *p_vout )
...
@@ -83,14 +82,7 @@ void vout_InitSPU( vout_thread_t *p_vout )
p_vout
->
b_force_alpha
=
VLC_FALSE
;
p_vout
->
b_force_alpha
=
VLC_FALSE
;
p_vout
->
b_force_crop
=
VLC_FALSE
;
p_vout
->
b_force_crop
=
VLC_FALSE
;
/* Create callback */
vout_AttachSPU
(
p_vout
,
VLC_TRUE
);
p_input
=
vlc_object_find
(
p_vout
,
VLC_OBJECT_INPUT
,
FIND_PARENT
);
if
(
p_input
)
{
UpdateSPU
(
p_vout
,
VLC_OBJECT
(
p_input
)
);
var_AddCallback
(
p_input
,
"highlight"
,
CropCallback
,
p_vout
);
vlc_object_release
(
p_input
);
}
}
}
/**
/**
...
@@ -100,7 +92,6 @@ void vout_InitSPU( vout_thread_t *p_vout )
...
@@ -100,7 +92,6 @@ void vout_InitSPU( vout_thread_t *p_vout )
*/
*/
void
vout_DestroySPU
(
vout_thread_t
*
p_vout
)
void
vout_DestroySPU
(
vout_thread_t
*
p_vout
)
{
{
vlc_object_t
*
p_input
;
int
i_index
;
int
i_index
;
/* Destroy all remaining subpictures */
/* Destroy all remaining subpictures */
...
@@ -131,13 +122,35 @@ void vout_DestroySPU( vout_thread_t *p_vout )
...
@@ -131,13 +122,35 @@ void vout_DestroySPU( vout_thread_t *p_vout )
vlc_object_destroy
(
p_vout
->
p_blend
);
vlc_object_destroy
(
p_vout
->
p_blend
);
}
}
/* Delete callback */
vout_AttachSPU
(
p_vout
,
VLC_FALSE
);
}
/**
* Attach/Detach the SPU from any input
*
* \param p_vout the vout in which to destroy the subpicture unit
* \param b_attach to select attach or detach
*/
void
vout_AttachSPU
(
vout_thread_t
*
p_vout
,
vlc_bool_t
b_attach
)
{
vlc_object_t
*
p_input
;
p_input
=
vlc_object_find
(
p_vout
,
VLC_OBJECT_INPUT
,
FIND_PARENT
);
p_input
=
vlc_object_find
(
p_vout
,
VLC_OBJECT_INPUT
,
FIND_PARENT
);
if
(
p_input
)
if
(
!
p_input
)
return
;
if
(
b_attach
)
{
{
UpdateSPU
(
p_vout
,
VLC_OBJECT
(
p_input
)
);
var_AddCallback
(
p_input
,
"highlight"
,
CropCallback
,
p_vout
);
vlc_object_release
(
p_input
);
}
else
{
/* Delete callback */
var_DelCallback
(
p_input
,
"highlight"
,
CropCallback
,
p_vout
);
var_DelCallback
(
p_input
,
"highlight"
,
CropCallback
,
p_vout
);
vlc_object_release
(
p_input
);
vlc_object_release
(
p_input
);
}
}
}
}
/**
/**
...
...
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