mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
Move setting of bitstream_id and bitstream_mode to ac3_encode_init().
Originally committed as revision 25983 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
ddf63d37b8
commit
e35c984a5d
@ -1277,8 +1277,6 @@ static av_cold int validate_options(AVCodecContext *avctx, AC3EncodeContext *s)
|
||||
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(AVCodecContext *avctx)
|
||||
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;
|
||||
|
Loading…
Reference in New Issue
Block a user