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
dbe7170e
Commit
dbe7170e
authored
Oct 31, 2011
by
Marton Balint
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ffplay: force video refresh if the window is resized or damaged
Signed-off-by:
Marton Balint
<
cus@passwd.hu
>
parent
9e2ee462
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
2 deletions
+15
-2
ffplay.c
ffplay.c
+15
-2
No files found.
ffplay.c
View file @
dbe7170e
...
...
@@ -133,6 +133,7 @@ typedef struct VideoState {
AVInputFormat
*
iformat
;
int
no_background
;
int
abort_request
;
int
force_refresh
;
int
paused
;
int
last_paused
;
int
seek_req
;
...
...
@@ -993,7 +994,7 @@ static int refresh_thread(void *opaque)
SDL_Event
event
;
event
.
type
=
FF_REFRESH_EVENT
;
event
.
user
.
data1
=
opaque
;
if
(
!
is
->
refresh
)
{
if
(
!
is
->
refresh
&&
(
!
is
->
paused
||
is
->
force_refresh
)
)
{
is
->
refresh
=
1
;
SDL_PushEvent
(
&
event
);
}
...
...
@@ -1156,6 +1157,9 @@ retry:
goto
retry
;
}
if
(
is
->
paused
)
goto
display
;
/* compute nominal last_duration */
last_duration
=
vp
->
pts
-
is
->
frame_last_pts
;
if
(
last_duration
>
0
&&
last_duration
<
10
.
0
)
{
...
...
@@ -1234,11 +1238,13 @@ retry:
}
}
display:
/* display picture */
if
(
!
display_disable
)
video_display
(
is
);
pictq_next_picture
(
is
);
if
(
!
is
->
paused
)
pictq_next_picture
(
is
);
}
}
else
if
(
is
->
audio_st
)
{
/* draw the next audio frame */
...
...
@@ -1250,6 +1256,7 @@ retry:
if
(
!
display_disable
)
video_display
(
is
);
}
is
->
force_refresh
=
0
;
if
(
show_status
)
{
static
int64_t
last_time
;
int64_t
cur_time
;
...
...
@@ -2829,6 +2836,7 @@ static void event_loop(VideoState *cur_stream)
break
;
case
SDLK_f
:
toggle_full_screen
(
cur_stream
);
cur_stream
->
force_refresh
=
1
;
break
;
case
SDLK_p
:
case
SDLK_SPACE
:
...
...
@@ -2848,6 +2856,7 @@ static void event_loop(VideoState *cur_stream)
break
;
case
SDLK_w
:
toggle_audio_display
(
cur_stream
);
cur_stream
->
force_refresh
=
1
;
break
;
case
SDLK_PAGEUP
:
incr
=
600
.
0
;
...
...
@@ -2890,6 +2899,9 @@ static void event_loop(VideoState *cur_stream)
break
;
}
break
;
case
SDL_VIDEOEXPOSE
:
cur_stream
->
force_refresh
=
1
;
break
;
case
SDL_MOUSEBUTTONDOWN
:
if
(
exit_on_mousedown
)
{
do_exit
(
cur_stream
);
...
...
@@ -2932,6 +2944,7 @@ static void event_loop(VideoState *cur_stream)
SDL_HWSURFACE
|
SDL_RESIZABLE
|
SDL_ASYNCBLIT
|
SDL_HWACCEL
);
screen_width
=
cur_stream
->
width
=
event
.
resize
.
w
;
screen_height
=
cur_stream
->
height
=
event
.
resize
.
h
;
cur_stream
->
force_refresh
=
1
;
break
;
case
SDL_QUIT
:
case
FF_QUIT_EVENT
:
...
...
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