Skip to content

Commit

Permalink
MythVideoTexture: Mark frames as valid when data has been uploaded
Browse files Browse the repository at this point in the history
- only applies to software frames
  • Loading branch information
mark-kendall committed Mar 14, 2019
1 parent e5145ed commit ee805b0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
3 changes: 3 additions & 0 deletions mythtv/libs/libmythtv/mythvideotexture.cpp
Expand Up @@ -337,6 +337,7 @@ void MythVideoTexture::YV12ToYV12(MythRenderOpenGL *Context, const VideoFrame *F
// Update
Texture->m_texture->setData(Texture->m_pixelFormat, Texture->m_pixelType,
static_cast<uint8_t*>(buffer) + offset);
Texture->m_valid = true;
}

/// \brief Copy YV12 frame data to a YUYV texture.
Expand Down Expand Up @@ -375,6 +376,7 @@ void MythVideoTexture::YV12ToYUYV(MythRenderOpenGL *Context, const VideoFrame *F

// Update
Texture->m_texture->setData(Texture->m_pixelFormat, Texture->m_pixelType, buffer);
Texture->m_valid = true;
}

/// \brief Copy YV12 frame data to a YUYV texture with high quality interlaced chroma sampling.
Expand Down Expand Up @@ -402,6 +404,7 @@ void MythVideoTexture::YV12ToYUYVHQ(MythRenderOpenGL *Context, const VideoFrame

// Update
Texture->m_texture->setData(Texture->m_pixelFormat, Texture->m_pixelType, Texture->m_data);
Texture->m_valid = true;
}

/// \brief Create a data buffer for holding CPU side texture data.
Expand Down
1 change: 1 addition & 0 deletions mythtv/libs/libmythtv/mythvideotexture.h
Expand Up @@ -49,6 +49,7 @@ class MythVideoTexture : public MythGLTexture
~MythVideoTexture();

public:
bool m_valid { false };
VideoFrameType m_frameType { FMT_NONE };
VideoFrameType m_frameFormat { FMT_NONE };
uint m_plane { 0 };
Expand Down

0 comments on commit ee805b0

Please sign in to comment.