Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion libavcodec/aacenc.c
Original file line number Diff line number Diff line change
Expand Up @@ -1162,7 +1162,7 @@ static av_cold int aac_encode_init(AVCodecContext *avctx)
/* Constants */
s->last_frame_pb_count = 0;
avctx->frame_size = 1024;
avctx->initial_padding = 1024;
avctx->initial_padding = s->options.remove_initial_padding ? 0 : 1024;
s->lambda = avctx->global_quality > 0 ? avctx->global_quality : 120;

/* Channel map and unspecified bitrate guessing */
Expand Down Expand Up @@ -1284,6 +1284,7 @@ static const AVOption aacenc_options[] = {
{"aac_pns", "Perceptual noise substitution", offsetof(AACEncContext, options.pns), AV_OPT_TYPE_BOOL, {.i64 = 1}, -1, 1, AACENC_FLAGS},
{"aac_tns", "Temporal noise shaping", offsetof(AACEncContext, options.tns), AV_OPT_TYPE_BOOL, {.i64 = 1}, -1, 1, AACENC_FLAGS},
{"aac_pce", "Forces the use of PCEs", offsetof(AACEncContext, options.pce), AV_OPT_TYPE_BOOL, {.i64 = 0}, -1, 1, AACENC_FLAGS},
{"remove_aac_initial_padding", "Set initial padding to 0 instead of 1024", offsetof(AACEncContext, options.remove_initial_padding), AV_OPT_TYPE_BOOL, {.i64 = 0}, 0, 1, AACENC_FLAGS},
FF_AAC_PROFILE_OPTS
{NULL}
};
Expand Down
1 change: 1 addition & 0 deletions libavcodec/aacenc.h
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ typedef struct AACEncOptions {
int pce;
int mid_side;
int intensity_stereo;
int remove_initial_padding;
} AACEncOptions;

/**
Expand Down