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
ab7cd556
Commit
ab7cd556
authored
Sep 01, 2015
by
Thomas Guillem
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mediacodec: move aspect ratio handling
parent
d25822d1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
13 deletions
+12
-13
modules/codec/omxil/mediacodec.c
modules/codec/omxil/mediacodec.c
+12
-13
No files found.
modules/codec/omxil/mediacodec.c
View file @
ab7cd556
...
...
@@ -772,6 +772,18 @@ static int Video_ProcessOutput(decoder_t *p_dec, mc_api_out *p_out,
{
picture_t
*
p_pic
=
NULL
;
/* Use the aspect ratio provided by the input (ie read from packetizer).
* Don't check the current value of the aspect ratio in fmt_out, since we
* want to allow changes in it to propagate. */
if
(
p_dec
->
fmt_in
.
video
.
i_sar_num
!=
0
&&
p_dec
->
fmt_in
.
video
.
i_sar_den
!=
0
&&
(
p_dec
->
fmt_out
.
video
.
i_sar_num
!=
p_dec
->
fmt_in
.
video
.
i_sar_num
||
p_dec
->
fmt_out
.
video
.
i_sar_den
!=
p_dec
->
fmt_in
.
video
.
i_sar_den
))
{
p_dec
->
fmt_out
.
video
.
i_sar_num
=
p_dec
->
fmt_in
.
video
.
i_sar_num
;
p_dec
->
fmt_out
.
video
.
i_sar_den
=
p_dec
->
fmt_in
.
video
.
i_sar_den
;
p_sys
->
b_update_format
=
true
;
}
if
(
p_sys
->
b_update_format
)
{
p_sys
->
b_update_format
=
false
;
...
...
@@ -1325,21 +1337,8 @@ static void Video_OnFlush(decoder_t *p_dec)
static
picture_t
*
DecodeVideo
(
decoder_t
*
p_dec
,
block_t
**
pp_block
)
{
decoder_sys_t
*
p_sys
=
p_dec
->
p_sys
;
picture_t
*
p_out
=
NULL
;
/* Use the aspect ratio provided by the input (ie read from packetizer).
* Don't check the current value of the aspect ratio in fmt_out, since we
* want to allow changes in it to propagate. */
if
(
p_dec
->
fmt_in
.
video
.
i_sar_num
!=
0
&&
p_dec
->
fmt_in
.
video
.
i_sar_den
!=
0
&&
(
p_dec
->
fmt_out
.
video
.
i_sar_num
!=
p_dec
->
fmt_in
.
video
.
i_sar_num
||
p_dec
->
fmt_out
.
video
.
i_sar_den
!=
p_dec
->
fmt_in
.
video
.
i_sar_den
))
{
p_dec
->
fmt_out
.
video
.
i_sar_num
=
p_dec
->
fmt_in
.
video
.
i_sar_num
;
p_dec
->
fmt_out
.
video
.
i_sar_den
=
p_dec
->
fmt_in
.
video
.
i_sar_den
;
p_sys
->
b_update_format
=
true
;
}
if
(
DecodeCommon
(
p_dec
,
pp_block
,
&
p_out
,
NULL
))
return
NULL
;
return
p_out
;
...
...
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