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
39a99d25
Commit
39a99d25
authored
Nov 23, 2013
by
Ilkka Ollakka
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
transcode: check if input has changed before sync check
parent
7e251ae7
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
17 deletions
+17
-17
modules/stream_out/transcode/audio.c
modules/stream_out/transcode/audio.c
+17
-17
No files found.
modules/stream_out/transcode/audio.c
View file @
39a99d25
...
@@ -202,6 +202,23 @@ int transcode_audio_process( sout_stream_t *p_stream,
...
@@ -202,6 +202,23 @@ int transcode_audio_process( sout_stream_t *p_stream,
while
(
(
p_audio_buf
=
id
->
p_decoder
->
pf_decode_audio
(
id
->
p_decoder
,
while
(
(
p_audio_buf
=
id
->
p_decoder
->
pf_decode_audio
(
id
->
p_decoder
,
&
in
))
)
&
in
))
)
{
{
/* Check if audio format has changed, and filters need reinit */
if
(
unlikely
(
(
id
->
p_decoder
->
fmt_out
.
audio
.
i_rate
!=
p_sys
->
fmt_audio
.
i_rate
)
||
(
id
->
p_decoder
->
fmt_out
.
audio
.
i_physical_channels
!=
p_sys
->
fmt_audio
.
i_physical_channels
)
)
)
{
msg_Info
(
p_stream
,
"Audio changed, trying to reinitialize filters"
);
if
(
id
->
p_af_chain
!=
NULL
)
aout_FiltersDelete
(
(
vlc_object_t
*
)
NULL
,
id
->
p_af_chain
);
/* decoders don't set audio.i_format, but audio filters use it */
id
->
p_decoder
->
fmt_out
.
audio
.
i_format
=
id
->
p_decoder
->
fmt_out
.
i_codec
;
aout_FormatPrepare
(
&
id
->
p_decoder
->
fmt_out
.
audio
);
if
(
transcode_audio_initialize_filters
(
p_stream
,
id
,
p_sys
,
&
id
->
p_decoder
->
fmt_out
.
audio
)
!=
VLC_SUCCESS
)
return
VLC_EGENERIC
;
}
if
(
p_sys
->
b_master_sync
)
if
(
p_sys
->
b_master_sync
)
{
{
mtime_t
i_pts
=
date_Get
(
&
id
->
interpolated_pts
);
mtime_t
i_pts
=
date_Get
(
&
id
->
interpolated_pts
);
...
@@ -226,23 +243,6 @@ int transcode_audio_process( sout_stream_t *p_stream,
...
@@ -226,23 +243,6 @@ int transcode_audio_process( sout_stream_t *p_stream,
p_audio_buf
->
i_dts
=
p_audio_buf
->
i_pts
;
p_audio_buf
->
i_dts
=
p_audio_buf
->
i_pts
;
/* Check if audio format has changed, and filters need reinit */
if
(
unlikely
(
(
id
->
p_decoder
->
fmt_out
.
audio
.
i_rate
!=
p_sys
->
fmt_audio
.
i_rate
)
||
(
id
->
p_decoder
->
fmt_out
.
audio
.
i_physical_channels
!=
p_sys
->
fmt_audio
.
i_physical_channels
)
)
)
{
msg_Info
(
p_stream
,
"Audio changed, trying to reinitialize filters"
);
if
(
id
->
p_af_chain
!=
NULL
)
aout_FiltersDelete
(
(
vlc_object_t
*
)
NULL
,
id
->
p_af_chain
);
/* decoders don't set audio.i_format, but audio filters use it */
id
->
p_decoder
->
fmt_out
.
audio
.
i_format
=
id
->
p_decoder
->
fmt_out
.
i_codec
;
aout_FormatPrepare
(
&
id
->
p_decoder
->
fmt_out
.
audio
);
if
(
transcode_audio_initialize_filters
(
p_stream
,
id
,
p_sys
,
&
id
->
p_decoder
->
fmt_out
.
audio
)
!=
VLC_SUCCESS
)
return
VLC_EGENERIC
;
}
/* Run filter chain */
/* Run filter chain */
p_audio_buf
=
aout_FiltersPlay
(
id
->
p_af_chain
,
p_audio_buf
,
p_audio_buf
=
aout_FiltersPlay
(
id
->
p_af_chain
,
p_audio_buf
,
INPUT_RATE_DEFAULT
);
INPUT_RATE_DEFAULT
);
...
...
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