summaryrefslogtreecommitdiffstats
path: root/video/decode/vd_lavc.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2017-02-16 15:25:18 +0100
committerwm4 <wm4@nowhere>2017-02-16 17:00:20 +0100
commitb949f2cee6af1ef47adcb6cf770e54c2787fa25c (patch)
tree6e40e8fb43edc8779f98c6840413e8f35feee81b /video/decode/vd_lavc.c
parent05eb42f6e159d5fc2c485f766cfabbc1429b6a4d (diff)
downloadmpv-b949f2cee6af1ef47adcb6cf770e54c2787fa25c.tar.bz2
mpv-b949f2cee6af1ef47adcb6cf770e54c2787fa25c.tar.xz
vd_lavc: remove some leftover vaapi locking infrastructure
Diffstat (limited to 'video/decode/vd_lavc.c')
-rw-r--r--video/decode/vd_lavc.c20
1 files changed, 0 insertions, 20 deletions
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.