Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
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
Commits
13268071
Commit
13268071
authored
Aug 20, 2009
by
Pierre d'Herbemont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
vout_pictures: Use unsigned for width and height in picture_Export.
parent
abfdb004
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
8 deletions
+6
-8
include/vlc_picture.h
include/vlc_picture.h
+1
-1
src/video_output/vout_intf.c
src/video_output/vout_intf.c
+2
-2
src/video_output/vout_pictures.c
src/video_output/vout_pictures.c
+3
-5
No files found.
include/vlc_picture.h
View file @
13268071
...
@@ -281,7 +281,7 @@ static inline void picture_Copy( picture_t *p_dst, const picture_t *p_src )
...
@@ -281,7 +281,7 @@ static inline void picture_Copy( picture_t *p_dst, const picture_t *p_src )
* picture to be encoded. If at most one of them is > 0 then the picture aspect
* picture to be encoded. If at most one of them is > 0 then the picture aspect
* ratio will be kept.
* ratio will be kept.
*/
*/
VLC_EXPORT
(
int
,
picture_Export
,
(
vlc_object_t
*
p_obj
,
block_t
**
pp_image
,
video_format_t
*
p_fmt
,
picture_t
*
p_picture
,
vlc_fourcc_t
i_format
,
int
i_override_width
,
int
i_override_height
)
);
VLC_EXPORT
(
int
,
picture_Export
,
(
vlc_object_t
*
p_obj
,
block_t
**
pp_image
,
video_format_t
*
p_fmt
,
picture_t
*
p_picture
,
vlc_fourcc_t
i_format
,
unsigned
i_override_width
,
unsigned
i_override_height
)
);
/**
/**
* This function will setup all fields of a picture_t without allocating any
* This function will setup all fields of a picture_t without allocating any
...
...
src/video_output/vout_intf.c
View file @
13268071
...
@@ -435,8 +435,8 @@ int vout_GetSnapshot( vout_thread_t *p_vout,
...
@@ -435,8 +435,8 @@ int vout_GetSnapshot( vout_thread_t *p_vout,
if
(
psz_format
&&
image_Type2Fourcc
(
psz_format
)
)
if
(
psz_format
&&
image_Type2Fourcc
(
psz_format
)
)
i_format
=
image_Type2Fourcc
(
psz_format
);
i_format
=
image_Type2Fourcc
(
psz_format
);
const
int
i_override_width
=
var_GetInteger
(
p_vout
,
"snapshot-width"
);
const
unsigned
i_override_width
=
var_GetInteger
(
p_vout
,
"snapshot-width"
);
const
int
i_override_height
=
var_GetInteger
(
p_vout
,
"snapshot-height"
);
const
unsigned
i_override_height
=
var_GetInteger
(
p_vout
,
"snapshot-height"
);
if
(
picture_Export
(
VLC_OBJECT
(
p_vout
),
pp_image
,
p_fmt
,
if
(
picture_Export
(
VLC_OBJECT
(
p_vout
),
pp_image
,
p_fmt
,
p_picture
,
i_format
,
i_override_width
,
i_override_height
)
)
p_picture
,
i_format
,
i_override_width
,
i_override_height
)
)
...
...
src/video_output/vout_pictures.c
View file @
13268071
...
@@ -1042,7 +1042,7 @@ int picture_Export( vlc_object_t *p_obj,
...
@@ -1042,7 +1042,7 @@ int picture_Export( vlc_object_t *p_obj,
video_format_t
*
p_fmt
,
video_format_t
*
p_fmt
,
picture_t
*
p_picture
,
picture_t
*
p_picture
,
vlc_fourcc_t
i_format
,
vlc_fourcc_t
i_format
,
int
i_override_width
,
int
i_override_height
)
unsigned
i_override_width
,
unsigned
i_override_height
)
{
{
/* */
/* */
video_format_t
fmt_in
=
p_picture
->
format
;
video_format_t
fmt_in
=
p_picture
->
format
;
...
@@ -1074,10 +1074,8 @@ int picture_Export( vlc_object_t *p_obj,
...
@@ -1074,10 +1074,8 @@ int picture_Export( vlc_object_t *p_obj,
}
}
/* */
/* */
fmt_out
.
i_width
=
(
i_override_width
<
0
)
?
fmt_out
.
i_width
=
i_override_width
>
0
?
i_override_width
:
i_original_width
;
i_original_width
:
i_override_width
;
fmt_out
.
i_height
=
i_override_height
>
0
?
i_override_height
:
i_original_height
;
fmt_out
.
i_height
=
(
i_override_height
<
0
)
?
i_original_height
:
i_override_height
;
/* scale if only one direction is provided */
/* scale if only one direction is provided */
if
(
fmt_out
.
i_height
==
0
&&
fmt_out
.
i_width
>
0
)
if
(
fmt_out
.
i_height
==
0
&&
fmt_out
.
i_width
>
0
)
...
...
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