[FFmpeg-devel] [PATCH 4/5] avcodec/ac3dec: avoid #if, use if() instead, its cleaner and shorter

Nedeljko Babic nedeljko.babic at imgtec.com
Mon Jan 20 15:50:00 CET 2014


From: Michael Niedermayer <michaelni at gmx.at>

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
Signed-off-by: Nedeljko Babic <nbabic at mips.com>
---
 libavcodec/ac3dec.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/libavcodec/ac3dec.c b/libavcodec/ac3dec.c
index 9d8cbae..1a3384d 100644
--- a/libavcodec/ac3dec.c
+++ b/libavcodec/ac3dec.c
@@ -857,9 +857,8 @@ static int decode_audio_block(AC3DecodeContext *s, int blk)
 
             s->spx_dst_start_freq = dst_start_freq;
             s->spx_src_start_freq = src_start_freq;
-#if !USE_FIXED
-            s->spx_dst_end_freq   = dst_end_freq;
-#endif
+            if (!USE_FIXED)
+                s->spx_dst_end_freq   = dst_end_freq;
 
             decode_band_structure(gbc, blk, s->eac3, 0,
                                   start_subband, end_subband,
-- 
1.8.2.1



More information about the ffmpeg-devel mailing list