Resolves issue with RTL2832 Tuner cancelling transfer buffers that

haven't yet been initialized.  This occurs when there is a channel
allocated from the tuner that is the first/only listener and then is
immediately released.  Some of the buffers are in motion and the others
simply haven't yet been initialized.
This commit is contained in:
denny
2016-02-22 20:49:20 -05:00
parent b821588e54
commit 6f2a7e89a9

View File

@@ -1527,7 +1527,14 @@ public abstract class RTL2832TunerController extends TunerController
{
for( Transfer transfer: mTransfers )
{
LibUsb.cancelTransfer( transfer );
try
{
LibUsb.cancelTransfer( transfer );
}
catch( IllegalStateException ise )
{
//Do nothing, the transfer pointer wasn't initialized
}
}
ByteBuffer completed = ByteBuffer.allocateDirect( 4 );