Revert "change libeplayer3 to own thread class"

This reverts commit 3f238feb60.


Origin commit data
------------------
Branch: master
Commit: b313db12a1
Author: max_10 <max_10@gmx.de>
Date: 2018-09-20 (Thu, 20 Sep 2018)



------------------
This commit was generated by Migit
This commit is contained in:
max_10
2018-09-20 17:18:35 +02:00
parent 09b8c49c8b
commit 9a0a03c733
8 changed files with 55 additions and 47 deletions

View File

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