Lines Matching refs:hw_frames_ctx
61 AVBufferRef *hw_frames_ctx;
67 av_buffer_unref(&ref->hw_frames_ctx);
114 if (ref->hw_frames_ctx) {
115 av_buffer_unref(&frame->hw_frames_ctx);
116 frame->hw_frames_ctx = av_buffer_ref(ref->hw_frames_ctx);
117 if (!frame->hw_frames_ctx)
549 AVBufferRef *hw_frames_ctx = av_hwframe_ctx_alloc(cached_frames->device_ref);
551 if (!hw_frames_ctx)
554 hw_frames = (AVHWFramesContext*)hw_frames_ctx->data;
560 ret = av_hwframe_ctx_init(hw_frames_ctx);
562 av_buffer_unref(&hw_frames_ctx);
567 vtctx->cached_hw_frames_ctx = hw_frames_ctx;
570 av_buffer_unref(&ref->hw_frames_ctx);
571 ref->hw_frames_ctx = av_buffer_ref(vtctx->cached_hw_frames_ctx);
572 if (!ref->hw_frames_ctx)
1188 if (!avctx->hw_frames_ctx && !avctx->hw_device_ctx) {
1190 "Either hw_frames_ctx or hw_device_ctx must be set.\n");
1200 if (avctx->hw_frames_ctx) {
1201 hw_frames = (AVHWFramesContext*)avctx->hw_frames_ctx->data;
1203 avctx->hw_frames_ctx = av_hwframe_ctx_alloc(avctx->hw_device_ctx);
1204 if (!avctx->hw_frames_ctx) {
1209 hw_frames = (AVHWFramesContext*)avctx->hw_frames_ctx->data;
1215 err = av_hwframe_ctx_init(avctx->hw_frames_ctx);
1217 av_buffer_unref(&avctx->hw_frames_ctx);
1222 vtctx->cached_hw_frames_ctx = av_buffer_ref(avctx->hw_frames_ctx);
1255 AVBufferRef *hw_frames_ctx)
1257 AVHWFramesContext *frames_ctx = (AVHWFramesContext*)hw_frames_ctx->data;