Skip to content

Commit

Permalink
small touch (last one)
Browse files Browse the repository at this point in the history
  • Loading branch information
georgemoralis committed Nov 10, 2024
1 parent 2328b71 commit e1f5068
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/core/libraries/videodec/videodec_impl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit e1f5068

Please sign in to comment.