Commit e35c984a authored by Justin Ruggles's avatar Justin Ruggles

Move setting of bitstream_id and bitstream_mode to ac3_encode_init().

Originally committed as revision 25983 to svn://svn.ffmpeg.org/ffmpeg/trunk
parent ddf63d37
...@@ -1277,8 +1277,6 @@ static av_cold int validate_options(AVCodecContext *avctx, AC3EncodeContext *s) ...@@ -1277,8 +1277,6 @@ static av_cold int validate_options(AVCodecContext *avctx, AC3EncodeContext *s)
s->sample_rate = avctx->sample_rate; s->sample_rate = avctx->sample_rate;
s->bit_alloc.sr_shift = i % 3; s->bit_alloc.sr_shift = i % 3;
s->bit_alloc.sr_code = 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 */ /* bitrate & frame size */
for (i = 0; i < 19; i++) { for (i = 0; i < 19; i++) {
...@@ -1312,6 +1310,9 @@ static av_cold int ac3_encode_init(AVCodecContext *avctx) ...@@ -1312,6 +1310,9 @@ static av_cold int ac3_encode_init(AVCodecContext *avctx)
if (ret) if (ret)
return 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->frame_size_min = 2 * ff_ac3_frame_size_tab[s->frame_size_code][s->bit_alloc.sr_code];
s->bits_written = 0; s->bits_written = 0;
s->samples_written = 0; s->samples_written = 0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment