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
0ef4924d
Commit
0ef4924d
authored
May 20, 2012
by
Nicolas George
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sdl: use AV_OPT_TYPE_IMAGE_SIZE.
parent
9bcd70aa
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
12 deletions
+1
-12
sdl.c
libavdevice/sdl.c
+1
-12
No files found.
libavdevice/sdl.c
View file @
0ef4924d
...
...
@@ -36,7 +36,6 @@ typedef struct {
SDL_Overlay
*
overlay
;
char
*
window_title
;
char
*
icon_title
;
char
*
window_size
;
int
window_width
,
window_height
;
int
overlay_width
,
overlay_height
;
int
overlay_fmt
;
...
...
@@ -58,7 +57,6 @@ static int sdl_write_trailer(AVFormatContext *s)
av_freep
(
&
sdl
->
window_title
);
av_freep
(
&
sdl
->
icon_title
);
av_freep
(
&
sdl
->
window_size
);
if
(
sdl
->
overlay
)
{
SDL_FreeYUVOverlay
(
sdl
->
overlay
);
...
...
@@ -120,15 +118,6 @@ static int sdl_write_header(AVFormatContext *s)
goto
fail
;
}
if
(
sdl
->
window_size
)
{
if
(
av_parse_video_size
(
&
sdl
->
window_width
,
&
sdl
->
window_height
,
sdl
->
window_size
)
<
0
)
{
av_log
(
s
,
AV_LOG_ERROR
,
"Invalid window size '%s'
\n
"
,
sdl
->
window_size
);
ret
=
AVERROR
(
EINVAL
);
goto
fail
;
}
}
/* compute overlay width and height from the codec context information */
sar
=
st
->
sample_aspect_ratio
.
num
?
av_q2d
(
st
->
sample_aspect_ratio
)
:
1
;
dar
=
sar
*
(
float
)
encctx
->
width
/
(
float
)
encctx
->
height
;
...
...
@@ -205,7 +194,7 @@ static int sdl_write_packet(AVFormatContext *s, AVPacket *pkt)
static
const
AVOption
options
[]
=
{
{
"window_title"
,
"SDL window title"
,
OFFSET
(
window_title
),
AV_OPT_TYPE_STRING
,
{.
str
=
NULL
},
0
,
0
,
AV_OPT_FLAG_ENCODING_PARAM
},
{
"icon_title"
,
"SDL iconified window title"
,
OFFSET
(
icon_title
)
,
AV_OPT_TYPE_STRING
,
{.
str
=
NULL
},
0
,
0
,
AV_OPT_FLAG_ENCODING_PARAM
},
{
"window_size"
,
"SDL window forced size"
,
OFFSET
(
window_
size
)
,
AV_OPT_TYPE_STRING
,
{.
str
=
NULL
},
0
,
0
,
AV_OPT_FLAG_ENCODING_PARAM
},
{
"window_size"
,
"SDL window forced size"
,
OFFSET
(
window_
width
),
AV_OPT_TYPE_IMAGE_SIZE
,{.
str
=
NULL
},
0
,
0
,
AV_OPT_FLAG_ENCODING_PARAM
},
{
NULL
},
};
...
...
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