From b04e50a51319cc2aff63e67eaf721e1d1babe593 Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Fri, 6 May 2005 19:52:04 +0000 Subject: [PATCH] gst/ffmpegcolorspace/gstffmpegcolorspace.c: Well, unreffing a buffer right before pushing it is asking for trouble.. Original commit message from CVS: * gst/ffmpegcolorspace/gstffmpegcolorspace.c: (gst_ffmpegcsp_getcaps), (gst_ffmpegcsp_configure_context), (gst_ffmpegcsp_setcaps), (gst_ffmpegcsp_chain): Well, unreffing a buffer right before pushing it is asking for trouble.. --- ChangeLog | 8 ++++++++ gst/ffmpegcolorspace/gstffmpegcolorspace.c | 11 +++++++++-- 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index f0ecefea5f..cd612f09e1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2005-05-06 Wim Taymans + + * gst/ffmpegcolorspace/gstffmpegcolorspace.c: + (gst_ffmpegcsp_getcaps), (gst_ffmpegcsp_configure_context), + (gst_ffmpegcsp_setcaps), (gst_ffmpegcsp_chain): + Well, unreffing a buffer right before pushing it is asking + for trouble.. + 2005-05-06 Christian Schaller * pkgconfig/gstreamer-libs.pc.in: add missing library calls diff --git a/gst/ffmpegcolorspace/gstffmpegcolorspace.c b/gst/ffmpegcolorspace/gstffmpegcolorspace.c index 8eb90c8d7d..c492cf76a9 100644 --- a/gst/ffmpegcolorspace/gstffmpegcolorspace.c +++ b/gst/ffmpegcolorspace/gstffmpegcolorspace.c @@ -247,7 +247,7 @@ gst_ffmpegcsp_setcaps (GstPad * pad, GstCaps * caps) par = gst_structure_get_value (structure, "pixel-aspect-ratio"); if (!gst_ffmpegcsp_configure_context (pad, caps, width, height)) - return FALSE; + goto configure_error; *prefered = caps; @@ -288,6 +288,12 @@ gst_ffmpegcsp_setcaps (GstPad * pad, GstCaps * caps) space->height = height; return TRUE; + +configure_error: + { + GST_DEBUG ("could not configure context"); + return FALSE; + } } static GType @@ -397,8 +403,9 @@ gst_ffmpegcsp_chain (GstPad * pad, GstBuffer * buffer) } if (space->from_pixfmt == space->to_pixfmt) { + GST_DEBUG ("passthrough conversion %" GST_PTR_FORMAT, + GST_PAD_CAPS (space->srcpad)); outbuf = inbuf; - gst_buffer_unref (outbuf); } else { /* convert */ gst_ffmpegcsp_avpicture_fill (&space->from_frame,