diff options
author | wm4 <wm4@nowhere> | 2017-02-16 15:25:18 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2017-02-16 17:00:20 +0100 |
commit | b949f2cee6af1ef47adcb6cf770e54c2787fa25c (patch) | |
tree | 6e40e8fb43edc8779f98c6840413e8f35feee81b /video | |
parent | 05eb42f6e159d5fc2c485f766cfabbc1429b6a4d (diff) | |
download | mpv-b949f2cee6af1ef47adcb6cf770e54c2787fa25c.tar.bz2 mpv-b949f2cee6af1ef47adcb6cf770e54c2787fa25c.tar.xz |
vd_lavc: remove some leftover vaapi locking infrastructure
Diffstat (limited to 'video')
-rw-r--r-- | video/decode/lavc.h | 3 | ||||
-rw-r--r-- | video/decode/vd_lavc.c | 20 |
2 files changed, 0 insertions, 23 deletions
diff --git a/video/decode/lavc.h b/video/decode/lavc.h index fd1c7feb42..46bf85a6e5 100644 --- a/video/decode/lavc.h +++ b/video/decode/lavc.h @@ -92,9 +92,6 @@ struct vd_lavc_hwdec { struct mp_image *(*allocate_image)(struct lavc_ctx *ctx, int w, int h); // Process the image returned by the libavcodec decoder. struct mp_image *(*process_image)(struct lavc_ctx *ctx, struct mp_image *img); - // For horrible Intel shit-drivers only - void (*lock)(struct lavc_ctx *ctx); - void (*unlock)(struct lavc_ctx *ctx); // Optional; if a special hardware decoder is needed (instead of "hwaccel"). const char *(*get_codec)(struct lavc_ctx *ctx, const char *codec); // Suffix for libavcodec decoder. If non-NULL, get_codec() is overridden diff --git a/video/decode/vd_lavc.c b/video/decode/vd_lavc.c index 54d827896f..ed5e0ad851 100644 --- a/video/decode/vd_lavc.c +++ b/video/decode/vd_lavc.c @@ -227,17 +227,6 @@ static bool hwdec_codec_allowed(struct dec_video *vd, const char *codec) return false; } -static void hwdec_lock(struct lavc_ctx *ctx) -{ - if (ctx->hwdec && ctx->hwdec->lock) - ctx->hwdec->lock(ctx); -} -static void hwdec_unlock(struct lavc_ctx *ctx) -{ - if (ctx->hwdec && ctx->hwdec->unlock) - ctx->hwdec->unlock(ctx); -} - // Find the correct profile entry for the current codec and profile. // Assumes the table has higher profiles first (for each codec). const struct hwdec_profile_entry *hwdec_find_profile( @@ -675,10 +664,7 @@ int hwdec_setup_hw_frames_ctx(struct lavc_ctx *ctx, AVBufferRef *device_ctx, fctx->initial_pool_size = initial_pool_size; - hwdec_lock(ctx); int res = av_hwframe_ctx_init(ctx->cached_hw_frames_ctx); - hwdec_unlock(ctx); - if (res > 0) { MP_ERR(ctx, "Failed to allocate hw frames.\n"); av_buffer_unref(&ctx->cached_hw_frames_ctx); @@ -837,10 +823,7 @@ static bool do_send_packet(struct dec_video *vd, struct demux_packet *pkt) AVPacket avpkt; mp_set_av_packet(&avpkt, pkt, &ctx->codec_timebase); - hwdec_lock(ctx); int ret = avcodec_send_packet(avctx, pkt ? &avpkt : NULL); - hwdec_unlock(ctx); - if (ret == AVERROR(EAGAIN) || ret == AVERROR_EOF) return false; @@ -878,10 +861,7 @@ static bool decode_frame(struct dec_video *vd) if (!prepare_decoding(vd)) return true; - hwdec_lock(ctx); int ret = avcodec_receive_frame(avctx, ctx->pic); - hwdec_unlock(ctx); - if (ret == AVERROR_EOF) { // If flushing was initialized earlier and has ended now, make it start // over in case we get new packets at some point in the future. |