changeset 33041:bf51474ed3fe

Attempt to fix crashes with VDPAU and threads.
author reimar
date Sun, 27 Mar 2011 13:18:59 +0000
parents a6be6a134ac0
children 5c9771fc80cd
files libmpcodecs/vd_ffmpeg.c
diffstat 1 files changed, 5 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/libmpcodecs/vd_ffmpeg.c	Sun Mar 27 13:09:27 2011 +0000
+++ b/libmpcodecs/vd_ffmpeg.c	Sun Mar 27 13:18:59 2011 +0000
@@ -238,7 +238,12 @@
         vd_ffmpeg_ctx *ctx = sh->context;
         ctx->do_dr1    = 1;
         ctx->do_slices = 1;
+        // HACK: FFmpeg thread handling is a major mess and
+        // hinders any attempt to decide on hwaccel after the
+        // codec is open. We really want this to change, so
+        // just beat it until it's dead
         avctx->thread_count    = 1;
+        avctx->active_thread_type = 0;
         avctx->get_buffer      = get_buffer;
         avctx->release_buffer  = release_buffer;
         avctx->reget_buffer    = get_buffer;