Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
F
ffmpeg.wasm-core
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Linshizhi
ffmpeg.wasm-core
Commits
2b377fb4
Commit
2b377fb4
authored
Dec 01, 2013
by
Marton Balint
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ffplay: factor out function setting default window size
Signed-off-by:
Marton Balint
<
cus@passwd.hu
>
parent
eff4820e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
6 deletions
+10
-6
ffplay.c
ffplay.c
+10
-6
No files found.
ffplay.c
View file @
2b377fb4
...
...
@@ -1066,20 +1066,24 @@ static void sigterm_handler(int sig)
exit
(
123
);
}
static
void
set_default_window_size
(
VideoPicture
*
vp
)
{
SDL_Rect
rect
;
calculate_display_rect
(
&
rect
,
0
,
0
,
INT_MAX
,
vp
->
height
,
vp
);
default_width
=
rect
.
w
;
default_height
=
rect
.
h
;
}
static
int
video_open
(
VideoState
*
is
,
int
force_set_video_mode
,
VideoPicture
*
vp
)
{
int
flags
=
SDL_HWSURFACE
|
SDL_ASYNCBLIT
|
SDL_HWACCEL
;
int
w
,
h
;
SDL_Rect
rect
;
if
(
is_full_screen
)
flags
|=
SDL_FULLSCREEN
;
else
flags
|=
SDL_RESIZABLE
;
if
(
vp
&&
vp
->
width
)
{
calculate_display_rect
(
&
rect
,
0
,
0
,
INT_MAX
,
vp
->
height
,
vp
);
default_width
=
rect
.
w
;
default_height
=
rect
.
h
;
}
if
(
vp
&&
vp
->
width
)
set_default_window_size
(
vp
);
if
(
is_full_screen
&&
fs_screen_width
)
{
w
=
fs_screen_width
;
...
...
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