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
68b6cc27
Commit
68b6cc27
authored
Jan 14, 2012
by
Ilkka Ollakka
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
transcode: reinit filter-chain when aspect-ratio changes
parent
f80f2a6b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
30 additions
and
0 deletions
+30
-0
modules/stream_out/transcode/transcode.h
modules/stream_out/transcode/transcode.h
+1
-0
modules/stream_out/transcode/video.c
modules/stream_out/transcode/video.c
+29
-0
No files found.
modules/stream_out/transcode/transcode.h
View file @
68b6cc27
...
...
@@ -36,6 +36,7 @@ struct sout_stream_sys_t
/* Video */
vlc_fourcc_t
i_vcodec
;
/* codec video (0 if not transcode) */
video_format_t
fmt_input_video
;
char
*
psz_venc
;
config_chain_t
*
p_video_cfg
;
int
i_vbitrate
;
...
...
modules/stream_out/transcode/video.c
View file @
68b6cc27
...
...
@@ -638,12 +638,41 @@ int transcode_video_process( sout_stream_t *p_stream, sout_stream_id_t *id,
b_need_duplicate
=
true
;
}
}
if
(
unlikely
(
id
->
p_encoder
->
p_module
&&
!
video_format_IsSimilar
(
&
p_sys
->
fmt_input_video
,
&
id
->
p_decoder
->
fmt_out
.
video
)
)
)
{
msg_Info
(
p_stream
,
"aspect-ratio changed, reiniting. %i -> %i : %i -> %i."
,
p_sys
->
fmt_input_video
.
i_sar_num
,
id
->
p_decoder
->
fmt_out
.
video
.
i_sar_num
,
p_sys
->
fmt_input_video
.
i_sar_den
,
id
->
p_decoder
->
fmt_out
.
video
.
i_sar_den
);
/* Close filters */
if
(
id
->
p_f_chain
)
filter_chain_Delete
(
id
->
p_f_chain
);
id
->
p_f_chain
=
NULL
;
if
(
id
->
p_uf_chain
)
filter_chain_Delete
(
id
->
p_uf_chain
);
id
->
p_uf_chain
=
NULL
;
/* Reinitialize filters */
id
->
p_encoder
->
fmt_out
.
video
.
i_width
=
p_sys
->
i_width
&
~
1
;
id
->
p_encoder
->
fmt_out
.
video
.
i_height
=
p_sys
->
i_height
&
~
1
;
id
->
p_encoder
->
fmt_out
.
video
.
i_sar_num
=
id
->
p_encoder
->
fmt_out
.
video
.
i_sar_den
=
0
;
transcode_video_encoder_init
(
p_stream
,
id
);
transcode_video_filter_init
(
p_stream
,
id
);
memcpy
(
&
p_sys
->
fmt_input_video
,
&
id
->
p_decoder
->
fmt_out
.
video
,
sizeof
(
video_format_t
));
}
if
(
unlikely
(
!
id
->
p_encoder
->
p_module
)
)
{
transcode_video_encoder_init
(
p_stream
,
id
);
transcode_video_filter_init
(
p_stream
,
id
);
memcpy
(
&
p_sys
->
fmt_input_video
,
&
id
->
p_decoder
->
fmt_out
.
video
,
sizeof
(
video_format_t
));
if
(
transcode_video_encoder_open
(
p_stream
,
id
)
!=
VLC_SUCCESS
)
{
...
...
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