diff --git a/libavcodec/ac3.h b/libavcodec/ac3.h index f8f6a81f45..e358f8d9e3 100644 --- a/libavcodec/ac3.h +++ b/libavcodec/ac3.h @@ -27,7 +27,6 @@ #ifndef AVCODEC_AC3_H #define AVCODEC_AC3_H -#define AC3_MAX_CODED_FRAME_SIZE 3840 /* in bytes */ #define EAC3_MAX_CHANNELS 16 /**< maximum number of channels in EAC3 */ #define AC3_MAX_CHANNELS 7 /**< maximum number of channels, including coupling channel */ #define CPL_CH 0 /**< coupling channel index */ diff --git a/libavcodec/ac3enc.c b/libavcodec/ac3enc.c index 8044e6dcd0..4cfd0afe12 100644 --- a/libavcodec/ac3enc.c +++ b/libavcodec/ac3enc.c @@ -1729,7 +1729,7 @@ static void ac3_output_frame(AC3EncodeContext *s, unsigned char *frame) { int blk; - init_put_bits(&s->pb, frame, AC3_MAX_CODED_FRAME_SIZE); + init_put_bits(&s->pb, frame, s->frame_size); s->output_frame_header(s);