Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
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-2-2
Commits
9029b521
Commit
9029b521
authored
Aug 08, 2008
by
Olivier Aubert
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Embedded snapshot: properly initialize snapshot-width/-height if they were not specified
parent
bddca171
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
1 deletion
+22
-1
src/video_output/vout_intf.c
src/video_output/vout_intf.c
+22
-1
No files found.
src/video_output/vout_intf.c
View file @
9029b521
...
@@ -484,9 +484,30 @@ int vout_Snapshot( vout_thread_t *p_vout, picture_t *p_pic )
...
@@ -484,9 +484,30 @@ int vout_Snapshot( vout_thread_t *p_vout, picture_t *p_pic )
/* Save the snapshot to a memory zone */
/* Save the snapshot to a memory zone */
fmt_in
=
p_vout
->
fmt_in
;
fmt_in
=
p_vout
->
fmt_in
;
fmt_out
.
i_sar_num
=
fmt_out
.
i_sar_den
=
1
;
fmt_out
.
i_sar_num
=
fmt_out
.
i_sar_den
=
1
;
fmt_out
.
i_chroma
=
VLC_FOURCC
(
'p'
,
'n'
,
'g'
,
' '
);
fmt_out
.
i_width
=
var_GetInteger
(
p_vout
,
"snapshot-width"
);
fmt_out
.
i_width
=
var_GetInteger
(
p_vout
,
"snapshot-width"
);
fmt_out
.
i_height
=
var_GetInteger
(
p_vout
,
"snapshot-height"
);
fmt_out
.
i_height
=
var_GetInteger
(
p_vout
,
"snapshot-height"
);
fmt_out
.
i_chroma
=
VLC_FOURCC
(
'p'
,
'n'
,
'g'
,
' '
);
/* If snapshot-width and/or snapshot height were not specified,
use a default snapshot width of 320 */
if
(
fmt_out
.
i_width
==
0
&&
fmt_out
.
i_height
==
0
)
{
fmt_out
.
i_width
=
320
;
}
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
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_width
;
}
else
{
fmt_out
.
i_width
=
fmt_in
.
i_width
;
fmt_out
.
i_height
=
fmt_in
.
i_height
;
}
p_block
=
(
block_t
*
)
image_Write
(
p_image
,
p_pic
,
&
fmt_in
,
&
fmt_out
);
p_block
=
(
block_t
*
)
image_Write
(
p_image
,
p_pic
,
&
fmt_in
,
&
fmt_out
);
if
(
!
p_block
)
if
(
!
p_block
)
...
...
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