[vlc-commits] converter/tospdif: rename write_16

Thomas Guillem git at videolan.org
Tue Jan 24 09:37:05 CET 2017


vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Fri Jan 13 09:32:27 2017 +0100| [f85f7ff27831eee3b536c380debb455f748693d9] | committer: Thomas Guillem

converter/tospdif: rename write_16

Rename it to set_16 since this function doesn't increment the offset.

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

 modules/audio_filter/converter/tospdif.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/modules/audio_filter/converter/tospdif.c b/modules/audio_filter/converter/tospdif.c
index a5e5065..f8a8a25 100644
--- a/modules/audio_filter/converter/tospdif.c
+++ b/modules/audio_filter/converter/tospdif.c
@@ -99,7 +99,7 @@ static bool is_big_endian( filter_t *p_filter, block_t *p_in_buf )
     }
 }
 
-static inline void write_16( filter_t *p_filter, void *p_buf, uint16_t i_val )
+static void set_16( filter_t *p_filter, void *p_buf, uint16_t i_val )
 {
     if( p_filter->fmt_out.audio.i_format == VLC_CODEC_SPDIFB )
         SetWBE( p_buf, i_val );
@@ -142,7 +142,7 @@ static void write_data( filter_t *p_filter, const void *p_buf, size_t i_size,
     {
         assert( p_sys->p_out_buf->i_buffer - p_sys->i_out_offset >= 2 );
         p_out += ( i_size & ~1 );
-        write_16( p_filter, p_out, p_in[i_size - 1] << 8 );
+        set_16( p_filter, p_out, p_in[i_size - 1] << 8 );
         p_sys->i_out_offset += 2;
     }
 }
@@ -186,11 +186,11 @@ static void write_finalize( filter_t *p_filter, uint16_t i_data_type,
         assert( p_sys->i_out_offset > SPDIF_HEADER_SIZE );
         assert( i_length_mul == 1 || i_length_mul == 8 );
 
-        write_16( p_filter, &p_out[0], 0xf872 ); /* syncword 1 */
-        write_16( p_filter, &p_out[2], 0x4e1f ); /* syncword 2 */
-        write_16( p_filter, &p_out[4], i_data_type ); /* data type */
+        set_16( p_filter, &p_out[0], 0xf872 ); /* syncword 1 */
+        set_16( p_filter, &p_out[2], 0x4e1f ); /* syncword 2 */
+        set_16( p_filter, &p_out[4], i_data_type ); /* data type */
         /* length in bits or bytes */
-        write_16( p_filter, &p_out[6],
+        set_16( p_filter, &p_out[6],
                   ( p_sys->i_out_offset - SPDIF_HEADER_SIZE ) * i_length_mul );
     }
 



More information about the vlc-commits mailing list