Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
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-gpu
Commits
a0b49d79
Commit
a0b49d79
authored
Feb 11, 2009
by
Jean-Paul Saman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fb: Cleanup properly after failing OpenDisplay.
parent
5d40c7d4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
21 deletions
+16
-21
modules/video_output/fb.c
modules/video_output/fb.c
+16
-21
No files found.
modules/video_output/fb.c
View file @
a0b49d79
...
...
@@ -361,15 +361,7 @@ static int Create( vlc_object_t *p_this )
if
(
OpenDisplay
(
p_vout
)
)
{
if
(
p_sys
->
b_tty
)
{
ioctl
(
p_sys
->
i_tty
,
VT_SETMODE
,
&
p_vout
->
p_sys
->
vt_mode
);
sigaction
(
SIGUSR1
,
&
p_vout
->
p_sys
->
sig_usr1
,
NULL
);
sigaction
(
SIGUSR2
,
&
p_vout
->
p_sys
->
sig_usr2
,
NULL
);
tcsetattr
(
0
,
0
,
&
p_vout
->
p_sys
->
old_termios
);
TextMode
(
p_sys
->
i_tty
);
}
free
(
p_vout
->
p_sys
);
Destroy
(
VLC_OBJECT
(
p_vout
)
);
return
VLC_EGENERIC
;
}
...
...
@@ -959,21 +951,24 @@ static void CloseDisplay( vout_thread_t *p_vout )
munmap
(
p_vout
->
p_sys
->
p_video
,
p_vout
->
p_sys
->
i_page_size
);
}
/* Restore palette */
if
(
p_vout
->
p_sys
->
var_info
.
bits_per_pixel
==
8
)
if
(
p_vout
->
p_sys
->
i_fd
>=
0
)
{
ioctl
(
p_vout
->
p_sys
->
i_fd
,
FBIOPUTCMAP
,
&
p_vout
->
p_sys
->
fb_cmap
);
free
(
p_vout
->
p_sys
->
p_palette
);
p_vout
->
p_sys
->
p_palette
=
NULL
;
}
/* Restore palette */
if
(
p_vout
->
p_sys
->
var_info
.
bits_per_pixel
==
8
)
{
ioctl
(
p_vout
->
p_sys
->
i_fd
,
FBIOPUTCMAP
,
&
p_vout
->
p_sys
->
fb_cmap
);
free
(
p_vout
->
p_sys
->
p_palette
);
p_vout
->
p_sys
->
p_palette
=
NULL
;
}
/* Restore fb config */
ioctl
(
p_vout
->
p_sys
->
i_fd
,
FBIOPUT_VSCREENINFO
,
&
p_vout
->
p_sys
->
old_info
);
/* Restore fb config */
ioctl
(
p_vout
->
p_sys
->
i_fd
,
FBIOPUT_VSCREENINFO
,
&
p_vout
->
p_sys
->
old_info
);
/* Close fb */
close
(
p_vout
->
p_sys
->
i_fd
);
/* Close fb */
close
(
p_vout
->
p_sys
->
i_fd
);
}
}
/*****************************************************************************
...
...
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