From patchwork Tue Jan 3 22:02:49 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rob Clark X-Patchwork-Id: 6040 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id DC88223F80 for ; Tue, 3 Jan 2012 22:03:08 +0000 (UTC) Received: from mail-ey0-f180.google.com (mail-ey0-f180.google.com [209.85.215.180]) by fiordland.canonical.com (Postfix) with ESMTP id D1D2AA1809A for ; Tue, 3 Jan 2012 22:03:08 +0000 (UTC) Received: by eaac11 with SMTP id c11so16120385eaa.11 for ; Tue, 03 Jan 2012 14:03:08 -0800 (PST) Received: by 10.205.120.11 with SMTP id fw11mr6884597bkc.89.1325628186782; Tue, 03 Jan 2012 14:03:06 -0800 (PST) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.205.82.144 with SMTP id ac16cs352490bkc; Tue, 3 Jan 2012 14:03:06 -0800 (PST) Received: by 10.236.9.33 with SMTP id 21mr53081096yhs.76.1325628184982; Tue, 03 Jan 2012 14:03:04 -0800 (PST) Received: from mail-gy0-f178.google.com (mail-gy0-f178.google.com [209.85.160.178]) by mx.google.com with ESMTPS id e4si8118805anm.40.2012.01.03.14.03.04 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 03 Jan 2012 14:03:04 -0800 (PST) Received-SPF: pass (google.com: domain of robdclark@gmail.com designates 209.85.160.178 as permitted sender) client-ip=209.85.160.178; Authentication-Results: mx.google.com; spf=pass (google.com: domain of robdclark@gmail.com designates 209.85.160.178 as permitted sender) smtp.mail=robdclark@gmail.com; dkim=pass (test mode) header.i=@gmail.com Received: by mail-gy0-f178.google.com with SMTP id g19so4457119ghb.37 for ; Tue, 03 Jan 2012 14:03:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=sender:from:to:cc:subject:date:message-id:x-mailer:in-reply-to :references; bh=/JV20T6xRytMgeFAdcQy5DrmZmuqVKEEn711lkVLGBo=; b=CzaqTm7zaf/mSyXMq80kGGXds4W7yt8AiNTDTyr6LXo9q9d9gnLi4+tPeLLTWIbPsv tVKZs0f8ilk9uB6k/5+X5K3ALdc7ByIEzvJQG7v+ckqOHKeV0v6rLiIObLa4Was3PtqG SdRWvnz71rgXkKnNMUOHyIZGVN33kQ49Rr67A= Received: by 10.236.131.97 with SMTP id l61mr70593778yhi.52.1325628184535; Tue, 03 Jan 2012 14:03:04 -0800 (PST) Received: from localhost (dragon.ti.com. [192.94.94.33]) by mx.google.com with ESMTPS id a7sm129991458ana.5.2012.01.03.14.03.03 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 03 Jan 2012 14:03:04 -0800 (PST) Sender: Rob Clark From: Rob Clark To: patches@linaro.org Cc: Rob Clark Subject: [PATCH 13/19] dvdspu: use refcnting instead of explicit copy Date: Tue, 3 Jan 2012 16:02:49 -0600 Message-Id: <1325628171-4803-6-git-send-email-rob@ti.com> X-Mailer: git-send-email 1.7.5.4 In-Reply-To: <1325628171-4803-1-git-send-email-rob@ti.com> References: <1325628171-4803-1-git-send-email-rob@ti.com> --- See: https://bugzilla.gnome.org/show_bug.cgi?id=667222 gst/dvdspu/gstdvdspu.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/gst/dvdspu/gstdvdspu.c b/gst/dvdspu/gstdvdspu.c index c1b97f3..fa68b24 100644 --- a/gst/dvdspu/gstdvdspu.c +++ b/gst/dvdspu/gstdvdspu.c @@ -563,7 +563,7 @@ dvdspu_handle_vid_buffer (GstDVDSpu * dvdspu, GstBuffer * buf) goto no_ref_frame; } - buf = gst_buffer_copy (dvdspu->ref_frame); + buf = gst_buffer_ref (dvdspu->ref_frame); #if 0 g_print ("Duping frame %" GST_TIME_FORMAT " with new TS %" GST_TIME_FORMAT @@ -601,7 +601,7 @@ dvdspu_handle_vid_buffer (GstDVDSpu * dvdspu, GstBuffer * buf) /* Take a copy in case we hit a still frame and need the pristine * frame around */ - copy = gst_buffer_copy (buf); + copy = gst_buffer_ref (buf); gst_buffer_replace (&dvdspu->ref_frame, copy); gst_buffer_unref (copy); }