Skip to content

Commit

Permalink
fix(Render): render frame when window not changed if player pause
Browse files Browse the repository at this point in the history
  • Loading branch information
I-m-SuperMan authored and pingkai committed Feb 18, 2020
1 parent 922aad1 commit adf3758
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
6 changes: 4 additions & 2 deletions framework/render/video/glRender/OESProgramContext.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,9 @@ void OESProgramContext::updateRotate(IVideoRender::Rotate rotate) {
}

void OESProgramContext::updateWindowSize(int width, int height, bool windowChanged) {
if (mWindowWidth == width && mWindowHeight == height && !windowChanged) {
mWindowChanged = windowChanged;

if (mWindowWidth == width && mWindowHeight == height && !mWindowChanged) {
return;
}

Expand Down Expand Up @@ -355,7 +357,7 @@ int OESProgramContext::updateFrame(std::unique_ptr<IAFFrame> &frame) {

if (mFrameAvailable) {
mFrameAvailable = false;
} else {
} else if (mWindowChanged) {
AF_LOGW("frame not available after 10ms");
return -1;
}
Expand Down
1 change: 1 addition & 0 deletions framework/render/video/glRender/OESProgramContext.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ class OESProgramContext : public IProgramContext , private DecoderSurfaceCallbac

int mWindowWidth = 0;
int mWindowHeight = 0;
bool mWindowChanged = false;

double mDar = 1;
int mFrameWidth = 0;
Expand Down

0 comments on commit adf3758

Please sign in to comment.