FFmpeg: Create, use av_err2string() (#689)

- Previously 'av_make_error_string' was defined in FFmpegUtilities.h
  for the sole purpose of redefining `av_err2str()` as a call to that
  function. `av_err2str()` was then used in our code, often in string
  contexts where its output was cast to `std::string`.
- Since that was excessively circular, instead the function is named
  `av_err2string()`, and it's used directly in contexts where a
  std::string is expected.
- `av_err2str()` is still #defined as `av_err2string(...).c_str()`
This commit is contained in:
Frank Dana
2021-08-11 03:58:45 -04:00
committed by GitHub
parent 7e419b9d64
commit fbe0242837
3 changed files with 17 additions and 15 deletions

View File

@@ -828,7 +828,9 @@ void FrameMapper::ResampleMappedAudio(std::shared_ptr<Frame> frame, int64_t orig
if (error_code < 0)
{
ZmqLogger::Instance()->AppendDebugMethod("FrameMapper::ResampleMappedAudio ERROR [" + (std::string)av_err2str(error_code) + "]", "error_code", error_code);
ZmqLogger::Instance()->AppendDebugMethod(
"FrameMapper::ResampleMappedAudio ERROR [" + av_err2string(error_code) + "]",
"error_code", error_code);
throw ErrorEncodingVideo("Error while resampling audio in frame mapper", frame->number);
}