Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2015-05-13 23:34:59 +0300
committerMichael Niedermayer <michaelni@gmx.at>2015-05-13 23:42:49 +0300
commitcc48409b51c8cd8fed8038c00ea8b4a6b2341004 (patch)
tree5930e10fb3a32b0464962e222c816f16969bb2ed /libavcodec/vda.c
parenta3adba358bbb3e8f953b15ad2820a3ff996ef91b (diff)
parente7c5e17d4fbd7c83fb331bf327e25ebd8e6a8623 (diff)
Merge commit 'e7c5e17d4fbd7c83fb331bf327e25ebd8e6a8623'
* commit 'e7c5e17d4fbd7c83fb331bf327e25ebd8e6a8623': vda: Make output CVPixelBuffer format configurable Conflicts: doc/APIchanges libavcodec/version.h Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/vda.c')
-rw-r--r--libavcodec/vda.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/libavcodec/vda.c b/libavcodec/vda.c
index 170580f16a..5867cae120 100644
--- a/libavcodec/vda.c
+++ b/libavcodec/vda.c
@@ -28,15 +28,22 @@ AVVDAContext *av_vda_alloc_context(void)
{
AVVDAContext *ret = av_mallocz(sizeof(*ret));
- if (ret)
+ if (ret) {
ret->output_callback = ff_vda_output_callback;
+ ret->cv_pix_fmt_type = kCVPixelFormatType_422YpCbCr8;
+ }
return ret;
}
int av_vda_default_init(AVCodecContext *avctx)
{
- avctx->hwaccel_context = av_vda_alloc_context();
+ return av_vda_default_init2(avctx, NULL);
+}
+
+int av_vda_default_init2(AVCodecContext *avctx, AVVDAContext *vdactx)
+{
+ avctx->hwaccel_context = vdactx ?: av_vda_alloc_context();
if (!avctx->hwaccel_context)
return AVERROR(ENOMEM);
return ff_vda_default_init(avctx);