small touch (last one)
Some checks failed
Build and Release / reuse (push) Has been cancelled
Build and Release / clang-format (push) Has been cancelled
Build and Release / get-info (push) Has been cancelled
Build and Release / windows-sdl (push) Has been cancelled
Build and Release / windows-qt (push) Has been cancelled
Build and Release / macos-sdl (push) Has been cancelled
Build and Release / macos-qt (push) Has been cancelled
Build and Release / linux-sdl (push) Has been cancelled
Build and Release / linux-qt (push) Has been cancelled
Build and Release / pre-release (push) Has been cancelled

This commit is contained in:
georgemoralis 2024-11-10 11:21:36 +02:00
parent 2328b712d9
commit e1f50682e9

View file

@ -136,6 +136,7 @@ s32 VdecDecoder::Flush(OrbisVideodecFrameBuffer& pFrameBufferInOut,
return ORBIS_VIDEODEC_ERROR_API_FAIL;
}
int frameCount = 0;
while (true) {
int ret = avcodec_receive_frame(mCodecContext, frame);
if (ret == AVERROR(EAGAIN) || ret == AVERROR_EOF) {
@ -172,6 +173,10 @@ s32 VdecDecoder::Flush(OrbisVideodecFrameBuffer& pFrameBufferInOut,
pPictureInfoOut.codec.avc.frameCropBottomOffset =
u32(frame->crop_bottom + (height - frame->height));
// TODO maybe more avc?
if (frameCount > 1) {
LOG_WARNING(Lib_Videodec, "We have more than 1 frame");
}
}
av_frame_free(&frame);