Revert "change libeplayer3 to own thread class"

This reverts commit 3f238feb60.


Origin commit data
------------------
Branch: master
Commit: 10710b9b53
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
committed by Thilo Graf
parent 3a618f5c1b
commit e61caae983
8 changed files with 55 additions and 47 deletions

View File

@@ -290,17 +290,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;
@@ -656,7 +656,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);