summaryrefslogtreecommitdiff
path: root/libavcodec/pthread.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-08-03 10:08:30 +0200
committerMichael Niedermayer <michaelni@gmx.at>2013-08-03 10:08:30 +0200
commit20be5e0a0e7563671efe0f085c9f160ff09ba494 (patch)
tree4db1a4e402d97dae295a0c6607726f0f192c0556 /libavcodec/pthread.c
parent038c4f65ee6c72f9d1ee4d4e46c74073992fabc8 (diff)
parent7950e519bb094897f957b9a9531cc60ba46cbc91 (diff)
Merge commit '7950e519bb094897f957b9a9531cc60ba46cbc91'
* commit '7950e519bb094897f957b9a9531cc60ba46cbc91': Disable deprecation warnings for cases where a replacement is available Conflicts: libavcodec/avpacket.c libavcodec/pthread.c libavcodec/utils.c libavdevice/v4l2.c libavfilter/avfiltergraph.c libavfilter/buffersrc.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/pthread.c')
-rw-r--r--libavcodec/pthread.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/libavcodec/pthread.c b/libavcodec/pthread.c
index f8ffd76e9e..8329155d0e 100644
--- a/libavcodec/pthread.c
+++ b/libavcodec/pthread.c
@@ -37,6 +37,7 @@
#include "libavutil/avassert.h"
#include "libavutil/common.h"
#include "libavutil/cpu.h"
+#include "libavutil/internal.h"
#if HAVE_PTHREADS
#include <pthread.h>
@@ -436,8 +437,10 @@ static int update_context_from_user(AVCodecContext *dst, AVCodecContext *src)
dst->draw_horiz_band= src->draw_horiz_band;
dst->get_buffer2 = src->get_buffer2;
#if FF_API_GET_BUFFER
+FF_DISABLE_DEPRECATION_WARNINGS
dst->get_buffer = src->get_buffer;
dst->release_buffer = src->release_buffer;
+FF_ENABLE_DEPRECATION_WARNINGS
#endif
dst->opaque = src->opaque;
@@ -541,12 +544,14 @@ static int submit_packet(PerThreadContext *p, AVPacket *avpkt)
* and it calls back to the client here.
*/
+FF_DISABLE_DEPRECATION_WARNINGS
if (!p->avctx->thread_safe_callbacks && (
p->avctx->get_format != avcodec_default_get_format ||
#if FF_API_GET_BUFFER
p->avctx->get_buffer ||
#endif
p->avctx->get_buffer2 != avcodec_default_get_buffer2)) {
+FF_ENABLE_DEPRECATION_WARNINGS
while (p->state != STATE_SETUP_FINISHED && p->state != STATE_INPUT_READY) {
int call_done = 1;
pthread_mutex_lock(&p->progress_mutex);
@@ -947,11 +952,13 @@ static int thread_get_buffer_internal(AVCodecContext *avctx, ThreadFrame *f, int
pthread_mutex_lock(&p->parent->buffer_mutex);
+FF_DISABLE_DEPRECATION_WARNINGS
if (avctx->thread_safe_callbacks || (
#if FF_API_GET_BUFFER
!avctx->get_buffer &&
#endif
avctx->get_buffer2 == avcodec_default_get_buffer2)) {
+FF_ENABLE_DEPRECATION_WARNINGS
err = ff_get_buffer(avctx, f->f, flags);
} else {
pthread_mutex_lock(&p->progress_mutex);
@@ -1018,6 +1025,7 @@ void ff_thread_release_buffer(AVCodecContext *avctx, ThreadFrame *f)
PerThreadContext *p = avctx->thread_opaque;
FrameThreadContext *fctx;
AVFrame *dst, *tmp;
+FF_DISABLE_DEPRECATION_WARNINGS
int can_direct_free = !(avctx->active_thread_type & FF_THREAD_FRAME) ||
avctx->thread_safe_callbacks ||
(
@@ -1025,6 +1033,7 @@ void ff_thread_release_buffer(AVCodecContext *avctx, ThreadFrame *f)
!avctx->get_buffer &&
#endif
avctx->get_buffer2 == avcodec_default_get_buffer2);
+FF_ENABLE_DEPRECATION_WARNINGS
if (!f->f->data[0])
return;