input/mms: use class ScopeUnlock
This commit is contained in:
@@ -51,16 +51,14 @@ protected:
|
|||||||
void
|
void
|
||||||
MmsInputStream::Open()
|
MmsInputStream::Open()
|
||||||
{
|
{
|
||||||
Unlock();
|
{
|
||||||
|
const ScopeUnlock unlock(mutex);
|
||||||
|
|
||||||
mms = mmsx_connect(nullptr, nullptr, GetURI(), 128 * 1024);
|
mms = mmsx_connect(nullptr, nullptr, GetURI(), 128 * 1024);
|
||||||
if (mms == nullptr) {
|
if (mms == nullptr)
|
||||||
Lock();
|
throw std::runtime_error("mmsx_connect() failed");
|
||||||
throw std::runtime_error("mmsx_connect() failed");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Lock();
|
|
||||||
|
|
||||||
/* TODO: is this correct? at least this selects the ffmpeg
|
/* TODO: is this correct? at least this selects the ffmpeg
|
||||||
decoder, which seems to work fine */
|
decoder, which seems to work fine */
|
||||||
SetMimeType("audio/x-ms-wma");
|
SetMimeType("audio/x-ms-wma");
|
||||||
|
Reference in New Issue
Block a user