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

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


Author: jbr
Date: Tue Dec 14 15:52:37 2010
New Revision: 25983

Log:
Move setting of bitstream_id and bitstream_mode to ac3_encode_init().

Modified:
   trunk/libavcodec/ac3enc.c

Modified: trunk/libavcodec/ac3enc.c
==============================================================================
--- trunk/libavcodec/ac3enc.c	Tue Dec 14 15:52:34 2010	(r25982)
+++ trunk/libavcodec/ac3enc.c	Tue Dec 14 15:52:37 2010	(r25983)
@@ -1277,8 +1277,6 @@ static av_cold int validate_options(AVCo
     s->sample_rate        = avctx->sample_rate;
     s->bit_alloc.sr_shift = i % 3;
     s->bit_alloc.sr_code  = i / 3;
-    s->bitstream_id       = 8 + s->bit_alloc.sr_shift;
-    s->bitstream_mode     = 0; /* complete main audio service */
 
     /* bitrate & frame size */
     for (i = 0; i < 19; i++) {
@@ -1312,6 +1310,9 @@ static av_cold int ac3_encode_init(AVCod
     if (ret)
         return ret;
 
+    s->bitstream_id   = 8 + s->bit_alloc.sr_shift;
+    s->bitstream_mode = 0; /* complete main audio service */
+
     s->frame_size_min  = 2 * ff_ac3_frame_size_tab[s->frame_size_code][s->bit_alloc.sr_code];
     s->bits_written    = 0;
     s->samples_written = 0;



More information about the ffmpeg-cvslog mailing list