fix some scenarios where video pointers should not be replaced
parent
b65d4e391c
commit
c83997609f
|
@ -17,7 +17,7 @@ namespace MoonWorks.Video
|
||||||
public uint yStride;
|
public uint yStride;
|
||||||
public uint uvStride;
|
public uint uvStride;
|
||||||
|
|
||||||
public bool FrameDataUpdated { get; private set; }
|
public bool FrameDataUpdated { get; set; }
|
||||||
|
|
||||||
bool IsDisposed;
|
bool IsDisposed;
|
||||||
|
|
||||||
|
@ -44,18 +44,29 @@ namespace MoonWorks.Video
|
||||||
{
|
{
|
||||||
lock (this)
|
lock (this)
|
||||||
{
|
{
|
||||||
if (Dav1dfile.df_readvideo(
|
if (!Ended)
|
||||||
Handle,
|
{
|
||||||
1,
|
if (Dav1dfile.df_readvideo(
|
||||||
out yDataHandle,
|
Handle,
|
||||||
out uDataHandle,
|
1,
|
||||||
out vDataHandle,
|
out var yDataHandle,
|
||||||
out yDataLength,
|
out var uDataHandle,
|
||||||
out uvDataLength,
|
out var vDataHandle,
|
||||||
out yStride,
|
out var yDataLength,
|
||||||
out uvStride) == 1
|
out var uvDataLength,
|
||||||
) {
|
out var yStride,
|
||||||
FrameDataUpdated = true;
|
out var uvStride) == 1
|
||||||
|
) {
|
||||||
|
this.yDataHandle = yDataHandle;
|
||||||
|
this.uDataHandle = uDataHandle;
|
||||||
|
this.vDataHandle = vDataHandle;
|
||||||
|
this.yDataLength = yDataLength;
|
||||||
|
this.uvDataLength = uvDataLength;
|
||||||
|
this.yStride = yStride;
|
||||||
|
this.uvStride = uvStride;
|
||||||
|
|
||||||
|
FrameDataUpdated = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -170,6 +170,7 @@ namespace MoonWorks.Video
|
||||||
if (CurrentStream.FrameDataUpdated)
|
if (CurrentStream.FrameDataUpdated)
|
||||||
{
|
{
|
||||||
UpdateRenderTexture();
|
UpdateRenderTexture();
|
||||||
|
CurrentStream.FrameDataUpdated = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
currentFrame = thisFrame;
|
currentFrame = thisFrame;
|
||||||
|
|
Loading…
Reference in New Issue