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
a93168ee
Commit
a93168ee
authored
Jan 02, 2008
by
Jean-Paul Saman
Committed by
Jean-Paul Saman
Mar 10, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Revert 0a9a04a8ca489e66b674a4c870cf81f0026ff5d4 and implement it the right way.
parent
315defaa
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
10 deletions
+20
-10
modules/stream_out/transcode.c
modules/stream_out/transcode.c
+20
-10
No files found.
modules/stream_out/transcode.c
View file @
a93168ee
...
@@ -1330,17 +1330,29 @@ static int transcode_audio_new( sout_stream_t *p_stream,
...
@@ -1330,17 +1330,29 @@ static int transcode_audio_new( sout_stream_t *p_stream,
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
;
/* Initialization of encoder format structures */
if
(
(
id
->
p_encoder
->
fmt_out
.
i_codec
==
VLC_FOURCC
(
's'
,
'a'
,
'm'
,
'r'
)
)
||
es_format_Init
(
&
id
->
p_encoder
->
fmt_in
,
AUDIO_ES
,
VLC_FOURCC
(
'f'
,
'l'
,
'3'
,
'2'
)
);
(
id
->
p_encoder
->
fmt_out
.
i_codec
==
VLC_FOURCC
(
's'
,
'a'
,
'w'
,
'b'
)
)
)
id
->
p_encoder
->
fmt_in
.
audio
.
i_format
=
VLC_FOURCC
(
'f'
,
'l'
,
'3'
,
'2'
);
id
->
p_encoder
->
fmt_in
.
audio
.
i_rate
=
id
->
p_encoder
->
fmt_out
.
audio
.
i_rate
;
else
id
->
p_encoder
->
fmt_in
.
audio
.
i_rate
=
fmt_last
.
audio
.
i_rate
;
#if 0
/* Fix AAC SBR changing number of channels and sampling rate */
if( ( id->p_decoder->fmt_in.i_codec == VLC_FOURCC('m','p','4','a') ) &&
( fmt_last.audio.i_rate != id->p_encoder->fmt_in.audio.i_rate ) &&
( fmt_last.audio.i_channels != id->p_encoder->fmt_in.audio.i_channels ) )
{
id->p_encoder->fmt_in.audio.i_rate = fmt_last.audio.i_rate;
id->p_encoder->fmt_out.audio.i_rate = fmt_last.audio.i_rate;
}
#endif
id
->
p_encoder
->
fmt_in
.
audio
.
i_rate
=
id
->
p_decoder
->
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_
de
coder
->
fmt_out
.
audio
.
i_physical_channels
;
id
->
p_
en
coder
->
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_
de
coder
->
fmt_out
.
audio
.
i_original_channels
;
id
->
p_
en
coder
->
fmt_out
.
audio
.
i_original_channels
;
id
->
p_encoder
->
fmt_in
.
audio
.
i_channels
=
id
->
p_encoder
->
fmt_in
.
audio
.
i_channels
=
id
->
p_
de
coder
->
fmt_out
.
audio
.
i_channels
;
id
->
p_
en
coder
->
fmt_out
.
audio
.
i_channels
;
id
->
p_encoder
->
fmt_in
.
audio
.
i_bitspersample
=
id
->
p_encoder
->
fmt_in
.
audio
.
i_bitspersample
=
audio_BitsPerSample
(
id
->
p_encoder
->
fmt_in
.
i_codec
);
audio_BitsPerSample
(
id
->
p_encoder
->
fmt_in
.
i_codec
);
...
@@ -1360,9 +1372,7 @@ static int transcode_audio_new( sout_stream_t *p_stream,
...
@@ -1360,9 +1372,7 @@ static int transcode_audio_new( sout_stream_t *p_stream,
audio_BitsPerSample
(
id
->
p_encoder
->
fmt_in
.
i_codec
);
audio_BitsPerSample
(
id
->
p_encoder
->
fmt_in
.
i_codec
);
/* Load conversion filters */
/* Load conversion filters */
/* Fix AAC SBR changing number of channels and sampling rate */
if
(
(
fmt_last
.
audio
.
i_rate
!=
id
->
p_encoder
->
fmt_in
.
audio
.
i_rate
)
&&
if
(
(
id
->
p_decoder
->
fmt_in
.
i_codec
==
VLC_FOURCC
(
'm'
,
'p'
,
'4'
,
'a'
)
)
&&
(
fmt_last
.
audio
.
i_rate
!=
id
->
p_encoder
->
fmt_in
.
audio
.
i_rate
)
&&
(
fmt_last
.
audio
.
i_channels
!=
id
->
p_encoder
->
fmt_in
.
audio
.
i_channels
)
)
(
fmt_last
.
audio
.
i_channels
!=
id
->
p_encoder
->
fmt_in
.
audio
.
i_channels
)
)
{
{
/* We'll have to go through fl32 first */
/* We'll have to go through fl32 first */
...
...
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