Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
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-2-2
Commits
7a9f74a1
Commit
7a9f74a1
authored
Feb 26, 2004
by
Gildas Bazin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* modules/video_output/directx/*: fixes uninitialized variables and memleaks.
parent
a1acd9a7
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
11 deletions
+22
-11
modules/video_output/directx/directx.c
modules/video_output/directx/directx.c
+18
-8
modules/video_output/directx/events.c
modules/video_output/directx/events.c
+4
-3
No files found.
modules/video_output/directx/directx.c
View file @
7a9f74a1
...
...
@@ -2,7 +2,7 @@
* vout.c: Windows DirectX video output display method
*****************************************************************************
* Copyright (C) 2001-2004 VideoLAN
* $Id: directx.c,v 1.3
5 2004/02/05 22:56:11
gbazin Exp $
* $Id: directx.c,v 1.3
6 2004/02/26 13:58:23
gbazin Exp $
*
* Authors: Gildas Bazin <gbazin@netcourrier.com>
*
...
...
@@ -184,9 +184,10 @@ static int OpenVideo( vlc_object_t *p_this )
p_vout
->
p_sys
->
p_display
=
NULL
;
p_vout
->
p_sys
->
p_current_surface
=
NULL
;
p_vout
->
p_sys
->
p_clipper
=
NULL
;
p_vout
->
p_sys
->
hwnd
=
NULL
;
p_vout
->
p_sys
->
hwnd
=
p_vout
->
p_sys
->
hvideownd
=
NULL
;
p_vout
->
p_sys
->
hparent
=
NULL
;
p_vout
->
p_sys
->
i_changes
=
0
;
SetRectEmpty
(
&
p_vout
->
p_sys
->
rect_display
);
/* Multimonitor stuff */
p_vout
->
p_sys
->
hmonitor
=
NULL
;
...
...
@@ -664,16 +665,16 @@ BOOL WINAPI DirectXEnumCallback( GUID* p_guid, LPTSTR psz_desc,
vout_thread_t
*
p_vout
=
(
vout_thread_t
*
)
p_context
;
vlc_value_t
device
;
var_Get
(
p_vout
,
"directx-device"
,
&
device
);
msg_Dbg
(
p_vout
,
"DirectXEnumCallback: %s, %s"
,
psz_desc
,
psz_drivername
);
if
(
hmon
)
{
if
(
(
!
device
.
psz_string
||
!
device
.
psz_string
)
&&
var_Get
(
p_vout
,
"directx-device"
,
&
device
);
if
(
(
!
device
.
psz_string
||
!*
device
.
psz_string
)
&&
hmon
==
p_vout
->
p_sys
->
hmonitor
)
{
;
if
(
device
.
psz_string
)
free
(
device
.
psz_string
)
;
}
else
if
(
strcmp
(
psz_drivername
,
device
.
psz_string
)
==
0
)
{
...
...
@@ -699,8 +700,13 @@ BOOL WINAPI DirectXEnumCallback( GUID* p_guid, LPTSTR psz_desc,
}
p_vout
->
p_sys
->
hmonitor
=
hmon
;
if
(
device
.
psz_string
)
free
(
device
.
psz_string
);
}
else
{
if
(
device
.
psz_string
)
free
(
device
.
psz_string
);
return
TRUE
;
/* Keep enumerating */
}
else
return
TRUE
;
/* Keep enumerating */
msg_Dbg
(
p_vout
,
"selecting %s, %s"
,
psz_desc
,
psz_drivername
);
p_vout
->
p_sys
->
p_display_driver
=
malloc
(
sizeof
(
GUID
)
);
...
...
@@ -751,7 +757,11 @@ static int DirectXInitDDraw( vout_thread_t *p_vout )
vlc_value_t
device
;
var_Get
(
p_vout
,
"directx-device"
,
&
device
);
msg_Dbg
(
p_vout
,
"directx-device: %s"
,
device
.
psz_string
);
if
(
device
.
psz_string
)
{
msg_Dbg
(
p_vout
,
"directx-device: %s"
,
device
.
psz_string
);
free
(
device
.
psz_string
);
}
p_vout
->
p_sys
->
hmonitor
=
p_vout
->
p_sys
->
MonitorFromWindow
(
p_vout
->
p_sys
->
hwnd
,
...
...
modules/video_output/directx/events.c
View file @
7a9f74a1
...
...
@@ -2,7 +2,7 @@
* events.c: Windows DirectX video output events handler
*****************************************************************************
* Copyright (C) 2001-2004 VideoLAN
* $Id: events.c,v 1.3
7 2004/01/02 22:17:57
gbazin Exp $
* $Id: events.c,v 1.3
8 2004/02/26 13:58:23
gbazin Exp $
*
* Authors: Gildas Bazin <gbazin@netcourrier.com>
*
...
...
@@ -498,8 +498,9 @@ void DirectXUpdateRects( vout_thread_t *p_vout, vlc_bool_t b_force )
vout_PlacePicture
(
p_vout
,
rect
.
right
,
rect
.
bottom
,
&
i_x
,
&
i_y
,
&
i_width
,
&
i_height
);
SetWindowPos
(
p_vout
->
p_sys
->
hvideownd
,
HWND_TOP
,
i_x
,
i_y
,
i_width
,
i_height
,
0
);
if
(
p_vout
->
p_sys
->
hvideownd
)
SetWindowPos
(
p_vout
->
p_sys
->
hvideownd
,
HWND_TOP
,
i_x
,
i_y
,
i_width
,
i_height
,
0
);
/* Destination image position and dimensions */
rect_dest
.
left
=
point
.
x
+
i_x
;
...
...
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