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
3ec46dc7
Commit
3ec46dc7
authored
Apr 29, 2013
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
transcode: fix audio format given to filters (fixes #8385)
parent
b01912eb
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
11 deletions
+5
-11
modules/stream_out/transcode/audio.c
modules/stream_out/transcode/audio.c
+5
-11
No files found.
modules/stream_out/transcode/audio.c
View file @
3ec46dc7
...
@@ -99,8 +99,7 @@ int transcode_audio_new( sout_stream_t *p_stream,
...
@@ -99,8 +99,7 @@ int transcode_audio_new( sout_stream_t *p_stream,
}
}
/* decoders don't set audio.i_format, but audio filters use it */
/* 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
;
id
->
p_decoder
->
fmt_out
.
audio
.
i_format
=
id
->
p_decoder
->
fmt_out
.
i_codec
;
id
->
p_decoder
->
fmt_out
.
audio
.
i_bitspersample
=
aout_FormatPrepare
(
&
id
->
p_decoder
->
fmt_out
.
audio
);
aout_BitsPerSample
(
id
->
p_decoder
->
fmt_out
.
i_codec
);
fmt_last
=
id
->
p_decoder
->
fmt_out
.
audio
;
fmt_last
=
id
->
p_decoder
->
fmt_out
.
audio
;
/* Fix AAC SBR changing number of channels and sampling rate */
/* Fix AAC SBR changing number of channels and sampling rate */
if
(
!
(
id
->
p_decoder
->
fmt_in
.
i_codec
==
VLC_CODEC_MP4A
&&
if
(
!
(
id
->
p_decoder
->
fmt_in
.
i_codec
==
VLC_CODEC_MP4A
&&
...
@@ -116,16 +115,12 @@ int transcode_audio_new( sout_stream_t *p_stream,
...
@@ -116,16 +115,12 @@ int transcode_audio_new( sout_stream_t *p_stream,
es_format_Init
(
&
id
->
p_encoder
->
fmt_in
,
id
->
p_decoder
->
fmt_in
.
i_cat
,
es_format_Init
(
&
id
->
p_encoder
->
fmt_in
,
id
->
p_decoder
->
fmt_in
.
i_cat
,
id
->
p_decoder
->
fmt_out
.
i_codec
);
id
->
p_decoder
->
fmt_out
.
i_codec
);
id
->
p_encoder
->
fmt_in
.
audio
.
i_format
=
id
->
p_decoder
->
fmt_out
.
i_codec
;
id
->
p_encoder
->
fmt_in
.
audio
.
i_format
=
id
->
p_decoder
->
fmt_out
.
i_codec
;
id
->
p_encoder
->
fmt_in
.
audio
.
i_rate
=
id
->
p_encoder
->
fmt_out
.
audio
.
i_rate
;
id
->
p_encoder
->
fmt_in
.
audio
.
i_rate
=
id
->
p_encoder
->
fmt_out
.
audio
.
i_rate
;
id
->
p_encoder
->
fmt_in
.
audio
.
i_physical_channels
=
id
->
p_encoder
->
fmt_in
.
audio
.
i_physical_channels
=
id
->
p_encoder
->
fmt_out
.
audio
.
i_physical_channels
;
id
->
p_encoder
->
fmt_out
.
audio
.
i_physical_channels
;
id
->
p_encoder
->
fmt_in
.
audio
.
i_original_channels
=
id
->
p_encoder
->
fmt_in
.
audio
.
i_original_channels
=
id
->
p_encoder
->
fmt_out
.
audio
.
i_original_channels
;
id
->
p_encoder
->
fmt_out
.
audio
.
i_original_channels
;
id
->
p_encoder
->
fmt_in
.
audio
.
i_channels
=
aout_FormatPrepare
(
&
id
->
p_encoder
->
fmt_in
.
audio
);
id
->
p_encoder
->
fmt_out
.
audio
.
i_channels
;
id
->
p_encoder
->
fmt_in
.
audio
.
i_bitspersample
=
aout_BitsPerSample
(
id
->
p_encoder
->
fmt_in
.
i_codec
);
id
->
p_encoder
->
p_cfg
=
p_stream
->
p_sys
->
p_audio_cfg
;
id
->
p_encoder
->
p_cfg
=
p_stream
->
p_sys
->
p_audio_cfg
;
id
->
p_encoder
->
p_module
=
id
->
p_encoder
->
p_module
=
...
@@ -139,14 +134,12 @@ int transcode_audio_new( sout_stream_t *p_stream,
...
@@ -139,14 +134,12 @@ int transcode_audio_new( sout_stream_t *p_stream,
id
->
p_decoder
->
p_module
=
NULL
;
id
->
p_decoder
->
p_module
=
NULL
;
return
VLC_EGENERIC
;
return
VLC_EGENERIC
;
}
}
id
->
p_encoder
->
fmt_in
.
audio
.
i_format
=
id
->
p_encoder
->
fmt_in
.
i_codec
;
id
->
p_encoder
->
fmt_in
.
audio
.
i_bitspersample
=
aout_BitsPerSample
(
id
->
p_encoder
->
fmt_in
.
i_codec
);
id
->
p_encoder
->
fmt_out
.
i_codec
=
id
->
p_encoder
->
fmt_out
.
i_codec
=
vlc_fourcc_GetCodec
(
AUDIO_ES
,
id
->
p_encoder
->
fmt_out
.
i_codec
);
vlc_fourcc_GetCodec
(
AUDIO_ES
,
id
->
p_encoder
->
fmt_out
.
i_codec
);
/* Fix channels */
/* Fix input format */
id
->
p_encoder
->
fmt_in
.
audio
.
i_format
=
id
->
p_encoder
->
fmt_in
.
i_codec
;
if
(
!
id
->
p_encoder
->
fmt_in
.
audio
.
i_physical_channels
if
(
!
id
->
p_encoder
->
fmt_in
.
audio
.
i_physical_channels
||
!
id
->
p_encoder
->
fmt_in
.
audio
.
i_original_channels
)
||
!
id
->
p_encoder
->
fmt_in
.
audio
.
i_original_channels
)
{
{
...
@@ -155,6 +148,7 @@ int transcode_audio_new( sout_stream_t *p_stream,
...
@@ -155,6 +148,7 @@ int transcode_audio_new( sout_stream_t *p_stream,
id
->
p_encoder
->
fmt_in
.
audio
.
i_original_channels
=
id
->
p_encoder
->
fmt_in
.
audio
.
i_original_channels
=
pi_channels_maps
[
id
->
p_encoder
->
fmt_in
.
audio
.
i_channels
];
pi_channels_maps
[
id
->
p_encoder
->
fmt_in
.
audio
.
i_channels
];
}
}
aout_FormatPrepare
(
&
id
->
p_encoder
->
fmt_in
.
audio
);
/* Load user specified audio filters */
/* Load user specified audio filters */
/* XXX: These variable names come kinda out of nowhere... */
/* XXX: These variable names come kinda out of nowhere... */
...
...
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