mirror of
https://github.com/clangen/musikcube.git
synced 2025-02-06 03:39:50 +00:00
Fixed FfmpegDecoder read callback returning EOF incorrectly.
This commit is contained in:
parent
e44c6be68d
commit
fa694408c3
@ -78,9 +78,11 @@ static int readCallback(void* opaque, uint8_t* buffer, int bufferSize) {
|
||||
FfmpegDecoder* decoder = static_cast<FfmpegDecoder*>(opaque);
|
||||
if (decoder && decoder->Stream()) {
|
||||
auto count = decoder->Stream()->Read(buffer, (PositionType) bufferSize);
|
||||
return (count == bufferSize) ? count : AVERROR_EOF;
|
||||
if (count > 0) {
|
||||
return count;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
return AVERROR_EOF;
|
||||
}
|
||||
|
||||
static int writeCallback(void* opaque, uint8_t* buffer, int bufferSize) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user