summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libavcodec/h263dec.c6
-rw-r--r--libavcodec/h264.c2
-rw-r--r--libavcodec/pthread.c3
-rw-r--r--libavcodec/version.h2
4 files changed, 10 insertions, 3 deletions
diff --git a/libavcodec/h263dec.c b/libavcodec/h263dec.c
index 28fb2dbbd5..e8edad7ab6 100644
--- a/libavcodec/h263dec.c
+++ b/libavcodec/h263dec.c
@@ -627,7 +627,8 @@ retry:
if(ff_MPV_frame_start(s, avctx) < 0)
return -1;
- if (!s->divx_packed) ff_thread_finish_setup(avctx);
+ if (!s->divx_packed && !avctx->hwaccel)
+ ff_thread_finish_setup(avctx);
if (CONFIG_MPEG4_VDPAU_DECODER && (s->avctx->codec->capabilities & CODEC_CAP_HWACCEL_VDPAU)) {
ff_vdpau_mpeg4_decode_picture(s, s->gb.buffer, s->gb.buffer_end - s->gb.buffer);
@@ -720,6 +721,9 @@ intrax8_decoded:
ff_MPV_frame_end(s);
+ if (!s->divx_packed && avctx->hwaccel)
+ ff_thread_finish_setup(avctx);
+
assert(s->current_picture.f.pict_type == s->current_picture_ptr->f.pict_type);
assert(s->current_picture.f.pict_type == s->pict_type);
if (s->pict_type == AV_PICTURE_TYPE_B || s->low_delay) {
diff --git a/libavcodec/h264.c b/libavcodec/h264.c
index f6f00bd9ed..6721365eb9 100644
--- a/libavcodec/h264.c
+++ b/libavcodec/h264.c
@@ -2032,7 +2032,7 @@ static void decode_postinit(H264Context *h, int setup_finished)
av_log(h->avctx, AV_LOG_DEBUG, "no picture\n");
}
- if (setup_finished)
+ if (setup_finished && !h->avctx->hwaccel)
ff_thread_finish_setup(h->avctx);
}
diff --git a/libavcodec/pthread.c b/libavcodec/pthread.c
index 9a92288dbb..404804dec1 100644
--- a/libavcodec/pthread.c
+++ b/libavcodec/pthread.c
@@ -428,6 +428,9 @@ static int update_context_from_thread(AVCodecContext *dst, AVCodecContext *src,
dst->colorspace = src->colorspace;
dst->color_range = src->color_range;
dst->chroma_sample_location = src->chroma_sample_location;
+
+ dst->hwaccel = src->hwaccel;
+ dst->hwaccel_context = src->hwaccel_context;
}
if (for_user) {
diff --git a/libavcodec/version.h b/libavcodec/version.h
index 8b4fbce1e5..394bf1a386 100644
--- a/libavcodec/version.h
+++ b/libavcodec/version.h
@@ -27,7 +27,7 @@
*/
#define LIBAVCODEC_VERSION_MAJOR 55
-#define LIBAVCODEC_VERSION_MINOR 0
+#define LIBAVCODEC_VERSION_MINOR 1
#define LIBAVCODEC_VERSION_MICRO 0
#define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \