avformat/utils: Use static mutexes instead of ff_lock_avformat()
Its existence is a remnant of (libavcodec's) lock-manager API
which has been removed in a04c2c707d.
There is no need to use the same lock for avisynth, chromaprint
or tls, so switch to ordinary static mutexes instead.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
parent
a2874c5721
commit
8b48b0adab
6 changed files with 30 additions and 46 deletions
|
|
@ -27,7 +27,6 @@
|
|||
#include "libavutil/bprint.h"
|
||||
#include "libavutil/internal.h"
|
||||
#include "libavutil/mem.h"
|
||||
#include "libavutil/thread.h"
|
||||
#include "libavutil/time.h"
|
||||
|
||||
#include "libavcodec/internal.h"
|
||||
|
|
@ -40,23 +39,11 @@
|
|||
#endif
|
||||
#include "os_support.h"
|
||||
|
||||
static AVMutex avformat_mutex = AV_MUTEX_INITIALIZER;
|
||||
|
||||
/**
|
||||
* @file
|
||||
* various utility functions for use within FFmpeg
|
||||
*/
|
||||
|
||||
int ff_lock_avformat(void)
|
||||
{
|
||||
return ff_mutex_lock(&avformat_mutex) ? -1 : 0;
|
||||
}
|
||||
|
||||
int ff_unlock_avformat(void)
|
||||
{
|
||||
return ff_mutex_unlock(&avformat_mutex) ? -1 : 0;
|
||||
}
|
||||
|
||||
/* an arbitrarily chosen "sane" max packet size -- 50M */
|
||||
#define SANE_CHUNK_SIZE (50000000)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue