[FFmpeg-cvslog] r25975 - trunk/libavcodec/ac3enc.c

jbr subversion
Tue Dec 14 15:52:08 CET 2010


Author: jbr
Date: Tue Dec 14 15:52:08 2010
New Revision: 25975

Log:
Change output_frame_end() to return void. The frame size is already known.

Modified:
   trunk/libavcodec/ac3enc.c

Modified: trunk/libavcodec/ac3enc.c
==============================================================================
--- trunk/libavcodec/ac3enc.c	Tue Dec 14 15:52:04 2010	(r25974)
+++ trunk/libavcodec/ac3enc.c	Tue Dec 14 15:52:08 2010	(r25975)
@@ -1038,7 +1038,7 @@ static unsigned int pow_poly(unsigned in
 /**
  * Fill the end of the frame with 0's and compute the two CRCs.
  */
-static int output_frame_end(AC3EncodeContext *s)
+static void output_frame_end(AC3EncodeContext *s)
 {
     int frame_size, frame_size_58, n, crc1, crc2, crc_inv;
     uint8_t *frame;
@@ -1069,8 +1069,6 @@ static int output_frame_end(AC3EncodeCon
                              frame + 2 * frame_size_58,
                              (frame_size - frame_size_58) * 2 - 2));
     AV_WB16(frame + 2*frame_size - 2, crc2);
-
-    return frame_size * 2;
 }
 
 
@@ -1188,7 +1186,9 @@ static int ac3_encode_frame(AVCodecConte
         output_audio_block(s, exp_strategy[blk], encoded_exp[blk],
                            bap[blk], mdct_coef[blk], exp_shift[blk], blk);
     }
-    return output_frame_end(s);
+    output_frame_end(s);
+
+    return s->frame_size * 2;
 }
 
 



More information about the ffmpeg-cvslog mailing list