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
77190676
Commit
77190676
authored
Jun 30, 2009
by
Rémi Duraffort
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix a segfault if the mask can't be loaded and aso fail imediately if the file
does not exist.
parent
a8e1052c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
2 deletions
+14
-2
modules/video_filter/erase.c
modules/video_filter/erase.c
+14
-2
No files found.
modules/video_filter/erase.c
View file @
77190676
...
@@ -113,6 +113,9 @@ static void LoadMask( filter_t *p_filter, const char *psz_filename )
...
@@ -113,6 +113,9 @@ static void LoadMask( filter_t *p_filter, const char *psz_filename )
p_filter
->
p_sys
->
p_mask
=
p_old_mask
;
p_filter
->
p_sys
->
p_mask
=
p_old_mask
;
msg_Err
(
p_filter
,
"Error while loading new mask. Keeping old mask."
);
msg_Err
(
p_filter
,
"Error while loading new mask. Keeping old mask."
);
}
}
else
msg_Err
(
p_filter
,
"Error while loading new mask. No mask available."
);
image_HandlerDelete
(
p_image
);
image_HandlerDelete
(
p_image
);
}
}
...
@@ -199,18 +202,29 @@ static void Destroy( vlc_object_t *p_this )
...
@@ -199,18 +202,29 @@ static void Destroy( vlc_object_t *p_this )
static
picture_t
*
Filter
(
filter_t
*
p_filter
,
picture_t
*
p_pic
)
static
picture_t
*
Filter
(
filter_t
*
p_filter
,
picture_t
*
p_pic
)
{
{
picture_t
*
p_outpic
;
picture_t
*
p_outpic
;
filter_sys_t
*
p_sys
=
p_filter
->
p_sys
;
if
(
!
p_pic
)
return
NULL
;
if
(
!
p_pic
)
return
NULL
;
/* If the mask if empty return the picture */
vlc_mutex_lock
(
&
p_sys
->
lock
);
if
(
!
p_sys
->
p_mask
)
{
vlc_mutex_unlock
(
&
p_sys
->
lock
);
return
p_pic
;
}
p_outpic
=
filter_NewPicture
(
p_filter
);
p_outpic
=
filter_NewPicture
(
p_filter
);
if
(
!
p_outpic
)
if
(
!
p_outpic
)
{
{
picture_Release
(
p_pic
);
picture_Release
(
p_pic
);
vlc_mutex_unlock
(
&
p_sys
->
lock
);
return
NULL
;
return
NULL
;
}
}
/* Here */
/* Here */
FilterErase
(
p_filter
,
p_pic
,
p_outpic
);
FilterErase
(
p_filter
,
p_pic
,
p_outpic
);
vlc_mutex_unlock
(
&
p_sys
->
lock
);
return
CopyInfoAndRelease
(
p_outpic
,
p_pic
);
return
CopyInfoAndRelease
(
p_outpic
,
p_pic
);
}
}
...
@@ -223,7 +237,6 @@ static void FilterErase( filter_t *p_filter, picture_t *p_inpic,
...
@@ -223,7 +237,6 @@ static void FilterErase( filter_t *p_filter, picture_t *p_inpic,
{
{
filter_sys_t
*
p_sys
=
p_filter
->
p_sys
;
filter_sys_t
*
p_sys
=
p_filter
->
p_sys
;
vlc_mutex_lock
(
&
p_sys
->
lock
);
const
int
i_mask_pitch
=
p_sys
->
p_mask
->
A_PITCH
;
const
int
i_mask_pitch
=
p_sys
->
p_mask
->
A_PITCH
;
const
int
i_mask_visible_pitch
=
p_sys
->
p_mask
->
p
[
A_PLANE
].
i_visible_pitch
;
const
int
i_mask_visible_pitch
=
p_sys
->
p_mask
->
p
[
A_PLANE
].
i_visible_pitch
;
const
int
i_mask_visible_lines
=
p_sys
->
p_mask
->
p
[
A_PLANE
].
i_visible_lines
;
const
int
i_mask_visible_lines
=
p_sys
->
p_mask
->
p
[
A_PLANE
].
i_visible_lines
;
...
@@ -392,7 +405,6 @@ static void FilterErase( filter_t *p_filter, picture_t *p_inpic,
...
@@ -392,7 +405,6 @@ static void FilterErase( filter_t *p_filter, picture_t *p_inpic,
}
}
}
}
}
}
vlc_mutex_unlock
(
&
p_sys
->
lock
);
}
}
static
int
EraseCallback
(
vlc_object_t
*
p_this
,
char
const
*
psz_var
,
static
int
EraseCallback
(
vlc_object_t
*
p_this
,
char
const
*
psz_var
,
...
...
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