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
08fc68fc
Commit
08fc68fc
authored
Jun 19, 2010
by
Laurent Aimar
Committed by
Jean-Baptiste Kempf
Jun 20, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed video format decoder changes detection.
parent
b971d0c9
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
29 deletions
+25
-29
src/input/decoder.c
src/input/decoder.c
+25
-29
No files found.
src/input/decoder.c
View file @
08fc68fc
...
...
@@ -2264,7 +2264,11 @@ static picture_t *vout_new_buffer( decoder_t *p_dec )
if
(
p_owner
->
p_vout
==
NULL
||
p_dec
->
fmt_out
.
video
.
i_width
!=
p_owner
->
video
.
i_width
||
p_dec
->
fmt_out
.
video
.
i_height
!=
p_owner
->
video
.
i_height
||
p_dec
->
fmt_out
.
video
.
i_chroma
!=
p_owner
->
video
.
i_chroma
||
p_dec
->
fmt_out
.
video
.
i_visible_width
!=
p_owner
->
video
.
i_visible_width
||
p_dec
->
fmt_out
.
video
.
i_visible_height
!=
p_owner
->
video
.
i_visible_height
||
p_dec
->
fmt_out
.
video
.
i_x_offset
!=
p_owner
->
video
.
i_x_offset
||
p_dec
->
fmt_out
.
video
.
i_y_offset
!=
p_owner
->
video
.
i_y_offset
||
p_dec
->
fmt_out
.
i_codec
!=
p_owner
->
video
.
i_chroma
||
(
int64_t
)
p_dec
->
fmt_out
.
video
.
i_sar_num
*
p_owner
->
video
.
i_sar_den
!=
(
int64_t
)
p_dec
->
fmt_out
.
video
.
i_sar_den
*
p_owner
->
video
.
i_sar_num
)
{
...
...
@@ -2277,52 +2281,45 @@ static picture_t *vout_new_buffer( decoder_t *p_dec )
return
NULL
;
}
if
(
!
p_dec
->
fmt_out
.
video
.
i_visible_width
||
!
p_dec
->
fmt_out
.
video
.
i_visible_height
)
video_format_t
fmt
=
p_dec
->
fmt_out
.
video
;
fmt
.
i_chroma
=
p_dec
->
fmt_out
.
i_codec
;
p_owner
->
video
=
fmt
;
if
(
!
fmt
.
i_visible_width
||
!
fmt
.
i_visible_height
)
{
if
(
p_dec
->
fmt_in
.
video
.
i_visible_width
&&
p_dec
->
fmt_in
.
video
.
i_visible_height
)
{
p_dec
->
fmt_out
.
video
.
i_visible_width
=
p_dec
->
fmt_in
.
video
.
i_visible_width
;
p_dec
->
fmt_out
.
video
.
i_visible_height
=
p_dec
->
fmt_in
.
video
.
i_visible_height
;
fmt
.
i_visible_width
=
p_dec
->
fmt_in
.
video
.
i_visible_width
;
fmt
.
i_visible_height
=
p_dec
->
fmt_in
.
video
.
i_visible_height
;
}
else
{
p_dec
->
fmt_out
.
video
.
i_visible_width
=
p_dec
->
fmt_out
.
video
.
i_width
;
p_dec
->
fmt_out
.
video
.
i_visible_height
=
p_dec
->
fmt_out
.
video
.
i_height
;
fmt
.
i_visible_width
=
fmt
.
i_width
;
fmt
.
i_visible_height
=
fmt
.
i_height
;
}
}
if
(
p_dec
->
fmt_out
.
video
.
i_visible_height
==
1088
&&
if
(
fmt
.
i_visible_height
==
1088
&&
var_CreateGetBool
(
p_dec
,
"hdtv-fix"
)
)
{
p_dec
->
fmt_out
.
video
.
i_visible_height
=
1080
;
if
(
!
(
p_dec
->
fmt_out
.
video
.
i_sar_num
%
136
))
fmt
.
i_visible_height
=
1080
;
if
(
!
(
fmt
.
i_sar_num
%
136
))
{
p_dec
->
fmt_out
.
video
.
i_sar_num
*=
135
;
p_dec
->
fmt_out
.
video
.
i_sar_den
*=
136
;
fmt
.
i_sar_num
*=
135
;
fmt
.
i_sar_den
*=
136
;
}
msg_Warn
(
p_dec
,
"Fixing broken HDTV stream (display_height=1088)"
);
}
if
(
!
p_dec
->
fmt_out
.
video
.
i_sar_num
||
!
p_dec
->
fmt_out
.
video
.
i_sar_den
)
if
(
!
fmt
.
i_sar_num
||
!
fmt
.
i_sar_den
)
{
p_dec
->
fmt_out
.
video
.
i_sar_num
=
1
;
p_dec
->
fmt_out
.
video
.
i_sar_den
=
1
;
fmt
.
i_sar_num
=
1
;
fmt
.
i_sar_den
=
1
;
}
vlc_ureduce
(
&
p_dec
->
fmt_out
.
video
.
i_sar_num
,
&
p_dec
->
fmt_out
.
video
.
i_sar_den
,
p_dec
->
fmt_out
.
video
.
i_sar_num
,
p_dec
->
fmt_out
.
video
.
i_sar_den
,
50000
);
p_dec
->
fmt_out
.
video
.
i_chroma
=
p_dec
->
fmt_out
.
i_codec
;
p_owner
->
video
=
p_dec
->
fmt_out
.
video
;
vlc_ureduce
(
&
fmt
.
i_sar_num
,
&
fmt
.
i_sar_den
,
fmt
.
i_sar_num
,
fmt
.
i_sar_den
,
50000
);
vlc_mutex_lock
(
&
p_owner
->
lock
);
...
...
@@ -2333,8 +2330,7 @@ static picture_t *vout_new_buffer( decoder_t *p_dec )
vlc_mutex_unlock
(
&
p_owner
->
lock
);
p_vout
=
input_resource_RequestVout
(
p_owner
->
p_input
->
p
->
p_resource
,
p_vout
,
&
p_dec
->
fmt_out
.
video
,
true
);
p_vout
,
&
fmt
,
true
);
vlc_mutex_lock
(
&
p_owner
->
lock
);
p_owner
->
p_vout
=
p_vout
;
...
...
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