[vlc-commits] transcode/audio: remove historical AAC SBR hack

Thomas Guillem git at videolan.org
Fri Jan 12 09:48:52 CET 2018


vlc/vlc-3.0 | branch: master | Thomas Guillem <thomas at gllm.fr> | Wed Jan 10 16:23:36 2018 +0100| [bb5d1de62a10ff84b1db72d470a6915229273d1c] | committer: Thomas Guillem

transcode/audio: remove historical AAC SBR hack

Should have been fixed by fbfe10b4df8106701184da66e0936e96fa3c202f

This is not needed anymore since the encoder use the updated decoder fmt_out
format.

(cherry picked from commit 9ef48c7369d1311ad6d83f8946fff52822d67d45)
Signed-off-by: Thomas Guillem <thomas at gllm.fr>

> http://git.videolan.org/gitweb.cgi/vlc/vlc-3.0.git/?a=commit;h=bb5d1de62a10ff84b1db72d470a6915229273d1c
---

 modules/stream_out/transcode/audio.c | 10 +---------
 1 file changed, 1 insertion(+), 9 deletions(-)

diff --git a/modules/stream_out/transcode/audio.c b/modules/stream_out/transcode/audio.c
index aafead3b57..2aa4a8b456 100644
--- a/modules/stream_out/transcode/audio.c
+++ b/modules/stream_out/transcode/audio.c
@@ -157,7 +157,6 @@ static int transcode_audio_new( sout_stream_t *p_stream,
                                 sout_stream_id_sys_t *id )
 {
     sout_stream_sys_t *p_sys = p_stream->p_sys;
-    audio_sample_format_t fmt_last;
 
     /*
      * Open decoder
@@ -179,13 +178,6 @@ static int transcode_audio_new( sout_stream_t *p_stream,
     /* 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 );
-    fmt_last = id->p_decoder->fmt_out.audio;
-    /* Fix AAC SBR changing number of channels and sampling rate */
-    if( !(id->p_decoder->fmt_in.i_codec == VLC_CODEC_MP4A &&
-        fmt_last.i_rate != id->p_encoder->fmt_in.audio.i_rate &&
-        fmt_last.i_channels != id->p_encoder->fmt_in.audio.i_channels) )
-        fmt_last.i_rate = id->p_decoder->fmt_in.audio.i_rate;
-
     /*
      * Open encoder
      */
@@ -193,7 +185,7 @@ static int transcode_audio_new( sout_stream_t *p_stream,
         return VLC_EGENERIC;
 
     if( unlikely( transcode_audio_initialize_filters( p_stream, id, p_sys,
-                                                      &fmt_last ) != VLC_SUCCESS ) )
+                        &id->p_decoder->fmt_out.audio ) != VLC_SUCCESS ) )
         return VLC_EGENERIC;
 
     return VLC_SUCCESS;



More information about the vlc-commits mailing list