We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
max
Hi guys,
I tried to setup and install RASR for the first time following the Beginners How To on https://www-i6.informatik.rwth-aachen.de/rwth-asr/manual/index.php/Beginner%27s_Howto I executed the scripts/requirements.sh and this executed well.
When running the Makefile, I got an error for Ffmpeg.cc:
Ffmpeg.cc
compiling Ffmpeg.cc Ffmpeg.cc:365:61: error: no matching function for call to 'max' u32 sample_offset = static_cast<u32>(std::max(0l, av_rescale_q(time_offset, internal_->fmt_ctx->streams[internal_->stream_idx]->time_base, sr_norm))); ^~~~~~~~ /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/__algorithm/max.h:39:1: note: candidate template ignored: deduced conflicting types for parameter '_Tp' ('long' vs. 'long long') max(const _Tp& __a, const _Tp& __b) ^ /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/__algorithm/max.h:50:1: note: candidate template ignored: could not match 'initializer_list<type-parameter-0-0>' against 'long' max(initializer_list<_Tp> __t, _Compare __comp) ^ /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/__algorithm/max.h:59:1: note: candidate function template not viable: requires single argument '__t', but 2 arguments were provided max(initializer_list<_Tp> __t) ^ /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/__algorithm/max.h:30:1: note: candidate function template not viable: requires 3 arguments, but 2 were provided max(const _Tp& __a, const _Tp& __b, _Compare __comp) ^ 1 error generated.
It seems, that the datatype of the parameter for the max function is wrong.
When changing the datatype from long to long long inside the Ffmpeg.cc, the error resolves.
long
long long
fmt = static_cast<AVSampleFormat>(out_frame->format); if (buffer_ == nullptr) { buffer_ = alloc_buffer(fmt); require(buffer_ != nullptr); } s64 time = av_frame_get_best_effort_timestamp(out_frame); s64 time_offset = lastSeekTime_ - time; AVRational sr_norm = av_make_q(1, av_frame_get_sample_rate(out_frame)); u32 sample_offset = static_cast<u32>(std::max(0ll, av_rescale_q(time_offset, internal_->fmt_ctx->streams[internal_->stream_idx]->time_base, sr_norm))); <----- buffer_size = add_to_buffer(buffer_, out_frame, fmt, sample_offset); } if (out_frame != frame) { av_frame_free(&out_frame); }
Simply set the first parameter of the max function from 0l to 0ll.
0l
0ll
This could be a versioning issue. Here my version information:
Maybe someone can reproduce this and check if the error occurs as well.
Regards, Frederick
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Hi guys,
I tried to setup and install RASR for the first time following the Beginners How To on https://www-i6.informatik.rwth-aachen.de/rwth-asr/manual/index.php/Beginner%27s_Howto
I executed the scripts/requirements.sh and this executed well.
Error
When running the Makefile, I got an error for
Ffmpeg.cc
:It seems, that the datatype of the parameter for the max function is wrong.
Solution
When changing the datatype from
long
tolong long
inside theFfmpeg.cc
, the error resolves.Simply set the first parameter of the max function from
0l
to0ll
.This could be a versioning issue. Here my version information:
Maybe someone can reproduce this and check if the error occurs as well.
Regards,
Frederick
The text was updated successfully, but these errors were encountered: