Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-1.1
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-1.1
Commits
49f85e90
Commit
49f85e90
authored
May 25, 2009
by
Erwan Tulou
Committed by
Jean-Baptiste Kempf
May 26, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
snapshot core : correct aspect ratio issue (trac #2705)
Signed-off-by:
Jean-Baptiste Kempf
<
jb@videolan.org
>
parent
cb9e93bf
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
29 additions
and
19 deletions
+29
-19
src/video_output/video_output.c
src/video_output/video_output.c
+3
-0
src/video_output/vout_pictures.c
src/video_output/vout_pictures.c
+26
-19
No files found.
src/video_output/video_output.c
View file @
49f85e90
...
...
@@ -1213,6 +1213,9 @@ static void* RunThread( void *p_this )
picture_Copy
(
p_pic
,
p_directbuffer
);
p_pic
->
format
.
i_sar_num
=
p_vout
->
fmt_out
.
i_sar_num
;
p_pic
->
format
.
i_sar_den
=
p_vout
->
fmt_out
.
i_sar_den
;
p_pic
->
p_next
=
p_vout
->
p
->
snapshot
.
p_picture
;
p_vout
->
p
->
snapshot
.
p_picture
=
p_pic
;
p_vout
->
p
->
snapshot
.
i_request
--
;
...
...
src/video_output/vout_pictures.c
View file @
49f85e90
...
...
@@ -1114,30 +1114,37 @@ int picture_Export( vlc_object_t *p_obj,
fmt_out
.
i_sar_num
=
fmt_out
.
i_sar_den
=
1
;
fmt_out
.
i_chroma
=
i_format
;
fmt_out
.
i_width
=
i_override_width
;
fmt_out
.
i_height
=
i_override_height
;
if
(
fmt_out
.
i_height
==
0
&&
fmt_out
.
i_width
>
0
)
/* compute original width/height */
unsigned
int
i_original_width
;
unsigned
int
i_original_height
;
if
(
fmt_in
.
i_sar_num
>=
fmt_in
.
i_sar_den
)
{
fmt_out
.
i_height
=
fmt_in
.
i_height
*
fmt_out
.
i_width
/
fmt_in
.
i_width
;
const
int
i_height
=
fmt_out
.
i_height
*
fmt_in
.
i_sar_den
/
fmt_in
.
i_sar_num
;
if
(
i_height
>
0
)
fmt_out
.
i_height
=
i_height
;
i_original_width
=
fmt_in
.
i_width
*
fmt_in
.
i_sar_num
/
fmt_in
.
i_sar_den
;
i_original_height
=
fmt_in
.
i_height
;
}
else
{
if
(
fmt_out
.
i_width
==
0
&&
fmt_out
.
i_height
>
0
)
{
fmt_out
.
i_width
=
fmt_in
.
i_width
*
fmt_out
.
i_height
/
fmt_in
.
i_height
;
}
else
{
fmt_out
.
i_width
=
fmt_in
.
i_width
;
fmt_out
.
i_height
=
fmt_in
.
i_height
;
}
const
int
i_width
=
fmt_out
.
i_width
*
fmt_in
.
i_sar_num
/
fmt_in
.
i_sar_den
;
if
(
i_width
>
0
)
fmt_out
.
i_width
=
i_width
;
i_original_width
=
fmt_in
.
i_width
;
i_original_height
=
fmt_in
.
i_height
*
fmt_in
.
i_sar_den
/
fmt_in
.
i_sar_num
;
}
/* */
fmt_out
.
i_width
=
(
i_override_width
<
0
)
?
i_original_width
:
i_override_width
;
fmt_out
.
i_height
=
(
i_override_height
<
0
)
?
i_original_height
:
i_override_height
;
/* scale if only one direction is provided */
if
(
fmt_out
.
i_height
==
0
&&
fmt_out
.
i_width
>
0
)
{
fmt_out
.
i_height
=
fmt_in
.
i_height
*
fmt_out
.
i_width
*
fmt_in
.
i_sar_den
/
fmt_in
.
i_width
/
fmt_in
.
i_sar_num
;
}
else
if
(
fmt_out
.
i_width
==
0
&&
fmt_out
.
i_height
>
0
)
{
fmt_out
.
i_width
=
fmt_in
.
i_width
*
fmt_out
.
i_height
*
fmt_in
.
i_sar_num
/
fmt_in
.
i_height
/
fmt_in
.
i_sar_den
;
}
image_handler_t
*
p_image
=
image_HandlerCreate
(
p_obj
);
...
...
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