mirror of
https://github.com/clangen/musikcube.git
synced 2025-03-14 04:18:36 +00:00
Fixed *nix compile error.
This commit is contained in:
parent
056ec704f5
commit
e3a3da754e
@ -55,6 +55,13 @@ extern "C" DLLEXPORT void SetDebug(IDebug* debug) {
|
||||
::debug = debug;
|
||||
}
|
||||
|
||||
static std::string getAvError(int errnum) {
|
||||
char buffer[AV_ERROR_MAX_STRING_SIZE];
|
||||
buffer[0] = '\0';
|
||||
av_make_error_string(buffer, AV_ERROR_MAX_STRING_SIZE, errnum);
|
||||
return std::string(buffer);
|
||||
}
|
||||
|
||||
static int readCallback(void* opaque, uint8_t* buffer, int bufferSize) {
|
||||
FfmpegDecoder* decoder = static_cast<FfmpegDecoder*>(opaque);
|
||||
if (decoder && decoder->Stream()) {
|
||||
@ -209,7 +216,7 @@ bool FfmpegDecoder::GetBuffer(IBuffer *buffer) {
|
||||
else {
|
||||
std::string err =
|
||||
"av_read_frame() failed: " +
|
||||
std::string(av_err2str(readFrameResult));
|
||||
getAvError(readFrameResult);
|
||||
|
||||
::debug->Warning(TAG, err.c_str());
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user