[vlc-commits] speex: cosmetics

Tristan Matthews git at videolan.org
Mon Apr 21 17:13:53 CEST 2014


vlc | branch: master | Tristan Matthews <le.businessman at gmail.com> | Mon Apr 21 11:12:17 2014 -0400| [cb792fd5de45691b088e30371f2f8f06fa5f0f4e] | committer: Tristan Matthews

speex: cosmetics

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

 modules/codec/speex.c |   26 +++++++++++++-------------
 1 file changed, 13 insertions(+), 13 deletions(-)

diff --git a/modules/codec/speex.c b/modules/codec/speex.c
index 90d773a..cbfb84a 100644
--- a/modules/codec/speex.c
+++ b/modules/codec/speex.c
@@ -558,18 +558,18 @@ static void *ProcessPacket( decoder_t *p_dec, ogg_packet *p_oggpacket,
             i_pcm_output_size = p_sys->p_header->frame_size;
             p_frame_holder = (short*)xmalloc( sizeof(short)*i_pcm_output_size );
 
-                speex_bits_read_from( &p_sys->bits, (char*)p_oggpacket->packet,
+            speex_bits_read_from( &p_sys->bits, (char*)p_oggpacket->packet,
                 p_oggpacket->bytes);
-                i_bits_before = speex_bits_remaining( &p_sys->bits );
+            i_bits_before = speex_bits_remaining( &p_sys->bits );
             speex_decode_int(p_sys->p_state, &p_sys->bits, p_frame_holder);
             i_bits_after = speex_bits_remaining( &p_sys->bits );
 
-                i_bits_in_speex_frame = i_bits_before - i_bits_after;
+            i_bits_in_speex_frame = i_bits_before - i_bits_after;
             i_bytes_in_speex_frame = ( i_bits_in_speex_frame +
                 (8 - (i_bits_in_speex_frame % 8)) )
-                    / 8;
+                / 8;
 
-                p_new_block = block_Alloc( i_bytes_in_speex_frame );
+            p_new_block = block_Alloc( i_bytes_in_speex_frame );
             memset( p_new_block->p_buffer, 0xff, i_bytes_in_speex_frame );
 
             /*
@@ -644,7 +644,7 @@ static block_t *DecodeRtpSpeexPacket( decoder_t *p_dec, block_t **pp_block )
     */
     if ( p_sys->bits.buf_size==0 )
     {
-        p_sys->p_header = (SpeexHeader *)malloc(sizeof(SpeexHeader));
+        p_sys->p_header = malloc(sizeof(SpeexHeader));
         if ( !p_sys->p_header )
         {
             msg_Err( p_dec, "Could not allocate a Speex header.");
@@ -654,7 +654,7 @@ static block_t *DecodeRtpSpeexPacket( decoder_t *p_dec, block_t **pp_block )
         const SpeexMode *mode = speex_lib_get_mode((p_sys->rtp_rate / 8000) >> 1);
 
         speex_init_header( p_sys->p_header,p_sys->rtp_rate, 1, mode );
-            speex_bits_init( &p_sys->bits );
+        speex_bits_init( &p_sys->bits );
         p_sys->p_state = speex_decoder_init( mode );
         if ( !p_sys->p_state )
         {
@@ -663,22 +663,22 @@ static block_t *DecodeRtpSpeexPacket( decoder_t *p_dec, block_t **pp_block )
             return NULL;
         }
 
-            /*
+        /*
           Assume that variable bit rate is enabled. Also assume
           that there is only one frame per packet.
         */
         p_sys->p_header->vbr = 1;
         p_sys->p_header->frames_per_packet = 1;
 
-            p_dec->fmt_out.audio.i_channels = p_sys->p_header->nb_channels;
+        p_dec->fmt_out.audio.i_channels = p_sys->p_header->nb_channels;
         p_dec->fmt_out.audio.i_physical_channels =
         p_dec->fmt_out.audio.i_original_channels =
             pi_channels_maps[p_sys->p_header->nb_channels];
-            p_dec->fmt_out.audio.i_rate = p_sys->p_header->rate;
+        p_dec->fmt_out.audio.i_rate = p_sys->p_header->rate;
 
-            if ( speex_mode_query( &speex_nb_mode,
-            SPEEX_MODE_FRAME_SIZE,
-            &i_speex_frame_size ) )
+        if ( speex_mode_query( &speex_nb_mode,
+                               SPEEX_MODE_FRAME_SIZE,
+                               &i_speex_frame_size ) )
         {
             msg_Err( p_dec, "Could not determine the frame size." );
             speex_decoder_destroy( p_sys->p_state );



More information about the vlc-commits mailing list