change libeplayer3 to own thread class

Origin commit data
------------------
Branch: master
Commit: 9ed0a0d244
Author: smogm <smogm@vh0st.me>
Date: 2015-01-12 (Mon, 12 Jan 2015)


------------------
No further description and justification available within origin commit message!

------------------
This commit was generated by Migit
This commit is contained in:
smogm
2015-01-12 20:26:52 +01:00
parent d82c21e928
commit 3f238feb60
8 changed files with 47 additions and 55 deletions

View File

@@ -280,17 +280,17 @@ static int lock_callback(void **mutex, enum AVLockOp op)
{
switch (op) {
case AV_LOCK_CREATE:
*mutex = (void *) new OpenThreads::Mutex;
*mutex = (void *) new Mutex;
return !*mutex;
case AV_LOCK_DESTROY:
delete static_cast<OpenThreads::Mutex *>(*mutex);
delete static_cast<Mutex *>(*mutex);
*mutex = NULL;
return 0;
case AV_LOCK_OBTAIN:
static_cast<OpenThreads::Mutex *>(*mutex)->lock();
static_cast<Mutex *>(*mutex)->lock();
return 0;
case AV_LOCK_RELEASE:
static_cast<OpenThreads::Mutex *>(*mutex)->unlock();
static_cast<Mutex *>(*mutex)->unlock();
return 0;
default:
return -1;
@@ -589,7 +589,7 @@ bool Input::Stop()
usleep(100000);
if (avfc) {
OpenThreads::ScopedLock<OpenThreads::Mutex> lock(mutex);
ScopedLock lock(mutex);
for (unsigned int i = 0; i < avfc->nb_streams; i++)
avcodec_close(avfc->streams[i]->codec);
avformat_close_input(&avfc);