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
41e4c6d8
Commit
41e4c6d8
authored
May 01, 2014
by
Lukasz Marek
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lavd/opengl_enc: use flag to mark inited context
Signed-off-by:
Lukasz Marek
<
lukasz.m.luki2@gmail.com
>
parent
c60b266e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
opengl_enc.c
libavdevice/opengl_enc.c
+4
-2
No files found.
libavdevice/opengl_enc.c
View file @
41e4c6d8
...
...
@@ -178,6 +178,7 @@ typedef struct OpenGLContext {
#endif
FFOpenGLFunctions
glprocs
;
int
inited
;
///< Set to 1 when write_header was successfully called.
uint8_t
background
[
4
];
///< Background color
int
no_window
;
///< 0 for create default window
char
*
window_title
;
///< Title of the window
...
...
@@ -309,8 +310,7 @@ static int opengl_resize(AVFormatContext *h, int width, int height)
OpenGLContext
*
opengl
=
h
->
priv_data
;
opengl
->
window_width
=
width
;
opengl
->
window_height
=
height
;
/* max_viewport_width == 0 means write_header was not called yet. */
if
(
opengl
->
max_viewport_width
)
{
if
(
opengl
->
inited
)
{
if
(
opengl
->
no_window
&&
(
ret
=
avdevice_dev_to_app_control_message
(
h
,
AV_DEV_TO_APP_PREPARE_WINDOW_BUFFER
,
NULL
,
0
))
<
0
)
{
av_log
(
opengl
,
AV_LOG_ERROR
,
"Application failed to prepare window buffer.
\n
"
);
...
...
@@ -1110,6 +1110,8 @@ static av_cold int opengl_write_header(AVFormatContext *h)
ret
=
AVERROR_EXTERNAL
;
OPENGL_ERROR_CHECK
(
opengl
);
opengl
->
inited
=
1
;
return
0
;
fail:
...
...
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