X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavcodec%2Fvda_h264.c;h=4d2274d649ee9779e7e358c94af47efa10081153;hb=9221e362fd3b4821db5a79cb2d04a12c715235de;hp=2a183302d0ecaea23af268eac09728dbbce2ba1b;hpb=c180f0f6d3981a93242c3ecabd6667434434ea03;p=ffmpeg diff --git a/libavcodec/vda_h264.c b/libavcodec/vda_h264.c index 2a183302d0e..4d2274d649e 100644 --- a/libavcodec/vda_h264.c +++ b/libavcodec/vda_h264.c @@ -143,7 +143,7 @@ static int vda_old_h264_end_frame(AVCodecContext *avctx) H264Context *h = avctx->priv_data; VDAContext *vda = avctx->internal->hwaccel_priv_data; struct vda_context *vda_ctx = avctx->hwaccel_context; - AVFrame *frame = &h->cur_pic_ptr->f; + AVFrame *frame = h->cur_pic_ptr->f; struct vda_buffer *context; AVBufferRef *buffer; int status; @@ -375,7 +375,7 @@ static int vda_h264_end_frame(AVCodecContext *avctx) H264Context *h = avctx->priv_data; VDAContext *vda = avctx->internal->hwaccel_priv_data; AVVDAContext *vda_ctx = avctx->hwaccel_context; - AVFrame *frame = &h->cur_pic_ptr->f; + AVFrame *frame = h->cur_pic_ptr->f; uint32_t flush_flags = 1 << 0; ///< kVDADecoderFlush_emitFrames CFDataRef coded_frame; OSStatus status; @@ -430,7 +430,7 @@ int ff_vda_default_init(AVCodecContext *avctx) CFMutableDictionaryRef buffer_attributes; CFMutableDictionaryRef io_surface_properties; CFNumberRef cv_pix_fmt; - int32_t fmt = 'avc1', pix_fmt = kCVPixelFormatType_422YpCbCr8; + int32_t fmt = 'avc1', pix_fmt = vda_ctx->cv_pix_fmt_type; // kCVPixelFormatType_420YpCbCr8Planar;