summaryrefslogtreecommitdiff
path: root/libavcodec/h264_slice.c
diff options
context:
space:
mode:
authorRonald S. Bultje <rsbultje@gmail.com>2015-08-16 19:35:59 -0400
committerRonald S. Bultje <rsbultje@gmail.com>2015-08-18 15:57:19 -0400
commit030b5a4f777b59066f1766030db082a53682994d (patch)
treefa4925411e7246103c96ba9a7c6fae69d273a3ce /libavcodec/h264_slice.c
parent7a629186ba0481f4aef1d9590d0e55b3bc5f4ed0 (diff)
lavc: put remaining bits of vdpau-in-decoder under FF_API_CAP_VDPAU.
Diffstat (limited to 'libavcodec/h264_slice.c')
-rw-r--r--libavcodec/h264_slice.c16
1 files changed, 12 insertions, 4 deletions
diff --git a/libavcodec/h264_slice.c b/libavcodec/h264_slice.c
index 48f501b0fb..e33048998a 100644
--- a/libavcodec/h264_slice.c
+++ b/libavcodec/h264_slice.c
@@ -612,8 +612,11 @@ static int h264_frame_start(H264Context *h)
if ((ret = alloc_picture(h, pic)) < 0)
return ret;
- if(!h->frame_recovered && !h->avctx->hwaccel &&
- !(h->avctx->codec->capabilities & AV_CODEC_CAP_HWACCEL_VDPAU))
+ if(!h->frame_recovered && !h->avctx->hwaccel
+#if FF_API_CAP_VDPAU
+ && !(h->avctx->codec->capabilities & AV_CODEC_CAP_HWACCEL_VDPAU)
+#endif
+ )
avpriv_color_frame(pic->f, c);
h->cur_pic_ptr = pic;
@@ -1048,6 +1051,7 @@ static int h264_slice_header_init(H264Context *h)
goto fail;
}
+#if FF_API_CAP_VDPAU
if (h->avctx->codec &&
h->avctx->codec->capabilities & AV_CODEC_CAP_HWACCEL_VDPAU &&
(h->sps.bit_depth_luma != 8 || h->sps.chroma_format_idc > 1)) {
@@ -1056,6 +1060,7 @@ static int h264_slice_header_init(H264Context *h)
ret = AVERROR_INVALIDDATA;
goto fail;
}
+#endif
if (h->sps.bit_depth_luma < 8 || h->sps.bit_depth_luma > 14 ||
h->sps.bit_depth_luma == 11 || h->sps.bit_depth_luma == 13
@@ -2533,8 +2538,11 @@ int ff_h264_execute_decode_slices(H264Context *h, unsigned context_count)
h->slice_ctx[0].next_slice_idx = INT_MAX;
- if (h->avctx->hwaccel ||
- h->avctx->codec->capabilities & AV_CODEC_CAP_HWACCEL_VDPAU)
+ if (h->avctx->hwaccel
+#if FF_API_CAP_VDPAU
+ || h->avctx->codec->capabilities & AV_CODEC_CAP_HWACCEL_VDPAU
+#endif
+ )
return 0;
if (context_count == 1) {
int ret;