|
@@ -100,6 +100,7 @@ struct audio_params {
|
|
|
char *name;
|
|
|
int abitrate;
|
|
|
int sample_rate;
|
|
|
+ int frame_size;
|
|
|
int channels;
|
|
|
};
|
|
|
|
|
@@ -220,6 +221,8 @@ static bool get_audio_params(struct audio_params *audio, int *argc,
|
|
|
return false;
|
|
|
if (!get_opt_int(argc, argv, &audio->sample_rate, "audio sample rate"))
|
|
|
return false;
|
|
|
+ if (!get_opt_int(argc, argv, &audio->frame_size, "audio frame size"))
|
|
|
+ return false;
|
|
|
if (!get_opt_int(argc, argv, &audio->channels, "audio channels"))
|
|
|
return false;
|
|
|
return true;
|
|
@@ -446,6 +449,7 @@ static void create_audio_stream(struct ffmpeg_mux *ffm, int idx)
|
|
|
context->bit_rate = (int64_t)ffm->audio[idx].abitrate * 1000;
|
|
|
context->channels = ffm->audio[idx].channels;
|
|
|
context->sample_rate = ffm->audio[idx].sample_rate;
|
|
|
+ context->frame_size = ffm->audio[idx].frame_size;
|
|
|
context->sample_fmt = AV_SAMPLE_FMT_S16;
|
|
|
context->time_base = stream->time_base;
|
|
|
context->extradata = extradata;
|