mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-libstb-hal.git
synced 2025-08-27 07:22:44 +02:00
libeplayer3/input: allow access to AVFormatContext
Origin commit data
------------------
Branch: master
Commit: 56ece5b5ea
Author: martii <m4rtii@gmx.de>
Date: 2014-05-29 (Thu, 29 May 2014)
------------------
No further description and justification available within origin commit message!
------------------
This commit was generated by Migit
This commit is contained in:
@@ -532,6 +532,7 @@ bool Input::Stop()
|
||||
usleep(100000);
|
||||
|
||||
if (avfc) {
|
||||
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);
|
||||
@@ -542,6 +543,21 @@ bool Input::Stop()
|
||||
return true;
|
||||
}
|
||||
|
||||
AVFormatContext *Input::GetAVFormatContext()
|
||||
{
|
||||
mutex.lock();
|
||||
if (avfc)
|
||||
return avfc;
|
||||
mutex.unlock();
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void Input::ReleaseAVFormatContext()
|
||||
{
|
||||
if (avfc)
|
||||
mutex.unlock();
|
||||
}
|
||||
|
||||
bool Input::Seek(int64_t avts, bool absolute)
|
||||
{
|
||||
if (absolute)
|
||||
|
Reference in New Issue
Block a user