Fix: besides the background video no other video is decoded
This commit is contained in:
1 parent
f069f9fd9b
commit
216375ab10
1 file changed
+19
-11
@@ -406,23 +406,31 @@ namespace Vocaluxe.Lib.Video.Acinerella
|
|||||||
|
|
||||||
public static bool AcGetFrame(IntPtr pAcInstance, IntPtr pAcDecoder)
|
public static bool AcGetFrame(IntPtr pAcInstance, IntPtr pAcDecoder)
|
||||||
{
|
{
|
||||||
|
if (pAcDecoder == IntPtr.Zero)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
lock (_GetLockToken(pAcDecoder))
|
lock (_GetLockToken(pAcDecoder))
|
||||||
{
|
{
|
||||||
var pckt = _ac_read_package(pAcInstance);
|
do
|
||||||
if (pckt != IntPtr.Zero)
|
|
||||||
{
|
{
|
||||||
if (pAcDecoder != IntPtr.Zero)
|
var pckt = _ac_read_package(pAcInstance);
|
||||||
|
if (pckt == IntPtr.Zero)
|
||||||
{
|
{
|
||||||
// The packet is for the video stream, try to decode it
|
return false;
|
||||||
if (_ac_decode_package(pckt, pAcDecoder) != 0)
|
|
||||||
{
|
|
||||||
ac_free_package(pckt);
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// The packet is for the video stream, try to decode it
|
||||||
|
if (_ac_decode_package(pckt, pAcDecoder) != 0)
|
||||||
|
{
|
||||||
|
ac_free_package(pckt);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
ac_free_package(pckt);
|
ac_free_package(pckt);
|
||||||
}
|
|
||||||
return false;
|
} while (true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user