You've already forked libopenshot
mirror of
https://github.com/OpenShot/libopenshot.git
synced 2026-03-02 08:53:52 -08:00
Merge branch 'develop' into hardware-support
This commit is contained in:
@@ -1615,8 +1615,8 @@ void FFmpegWriter::write_audio_packets(bool final)
|
||||
|
||||
} else {
|
||||
// Create a new array
|
||||
//final_samples = new int16_t[audio_input_position * (av_get_bytes_per_sample(audio_codec->sample_fmt) / av_get_bytes_per_sample(AV_SAMPLE_FMT_S16))];
|
||||
final_samples = (int16_t*)av_malloc(sizeof(int16_t) * audio_input_position * (av_get_bytes_per_sample(audio_codec->sample_fmt) / av_get_bytes_per_sample(AV_SAMPLE_FMT_S16)));
|
||||
final_samples = (int16_t*)av_malloc(sizeof(int16_t) * audio_input_position * (av_get_bytes_per_sample(audio_codec->sample_fmt) / av_get_bytes_per_sample(AV_SAMPLE_FMT_S16)));
|
||||
|
||||
// Copy audio into buffer for frame
|
||||
memcpy(final_samples, samples, audio_input_position * av_get_bytes_per_sample(audio_codec->sample_fmt));
|
||||
|
||||
@@ -2030,6 +2030,11 @@ void FFmpegWriter::OutputStreamInfo()
|
||||
// Init a collection of software rescalers (thread safe)
|
||||
void FFmpegWriter::InitScalers(int source_width, int source_height)
|
||||
{
|
||||
int scale_mode = SWS_FAST_BILINEAR;
|
||||
if (openshot::Settings::Instance()->HIGH_QUALITY_SCALING) {
|
||||
scale_mode = SWS_LANCZOS;
|
||||
}
|
||||
|
||||
// Init software rescalers vector (many of them, one for each thread)
|
||||
for (int x = 0; x < num_of_rescalers; x++)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user