commit
273482dbe9
|
@ -132,6 +132,10 @@ static bool initialize_codec(struct enc_encoder *enc)
|
||||||
warn("Failed to open AAC codec: %s", av_err2str(ret));
|
warn("Failed to open AAC codec: %s", av_err2str(ret));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
enc->aframe->format = enc->context->sample_fmt;
|
||||||
|
enc->aframe->channels = enc->context->channels;
|
||||||
|
enc->aframe->channel_layout = enc->context->channel_layout;
|
||||||
|
enc->aframe->sample_rate = enc->context->sample_rate;
|
||||||
|
|
||||||
enc->frame_size = enc->context->frame_size;
|
enc->frame_size = enc->context->frame_size;
|
||||||
if (!enc->frame_size)
|
if (!enc->frame_size)
|
||||||
|
|
|
@ -290,6 +290,11 @@ static bool open_audio_codec(struct ffmpeg_data *data)
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
data->aframe->format = context->sample_fmt;
|
||||||
|
data->aframe->channels = context->channels;
|
||||||
|
data->aframe->channel_layout = context->channel_layout;
|
||||||
|
data->aframe->sample_rate = context->sample_rate;
|
||||||
|
|
||||||
context->strict_std_compliance = -2;
|
context->strict_std_compliance = -2;
|
||||||
|
|
||||||
ret = avcodec_open2(context, data->acodec, NULL);
|
ret = avcodec_open2(context, data->acodec, NULL);
|
||||||
|
|
Loading…
Reference in New Issue