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

Thomas Guillem git at videolan.org
Wed Jan 10 19:32:15 CET 2018


vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Wed Jan 10 16:23:36 2018 +0100| [9ef48c7369d1311ad6d83f8946fff52822d67d45] | 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.

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

 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