From 5ba3fd3c6370396842a1f85e201f26c6eeabb833 Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Wed, 24 Apr 2013 16:24:25 +0200 Subject: [PATCH] vrawdepay: return output buffer from process Return the output buffer from the process function instead of pushing it ourselves. This way, the subclass can actually deal with the return value of the push. Fixes https://bugzilla.gnome.org/show_bug.cgi?id=693727 --- gst/rtp/gstrtpvrawdepay.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/gst/rtp/gstrtpvrawdepay.c b/gst/rtp/gstrtpvrawdepay.c index e59785884a..c2fca1b069 100644 --- a/gst/rtp/gstrtpvrawdepay.c +++ b/gst/rtp/gstrtpvrawdepay.c @@ -301,6 +301,7 @@ gst_rtp_vraw_depay_process (GstRTPBaseDepayload * depayload, GstBuffer * buf) GstRTPBuffer rtp = { NULL }; GstVideoFrame frame; gboolean marker; + GstBuffer *outbuf = NULL; rtpvrawdepay = GST_RTP_VRAW_DEPAY (depayload); @@ -528,13 +529,11 @@ gst_rtp_vraw_depay_process (GstRTPBaseDepayload * depayload, GstBuffer * buf) if (marker) { GST_LOG_OBJECT (depayload, "marker, flushing frame"); - if (rtpvrawdepay->outbuf) { - gst_rtp_base_depayload_push (depayload, rtpvrawdepay->outbuf); - rtpvrawdepay->outbuf = NULL; - } + outbuf = rtpvrawdepay->outbuf; + rtpvrawdepay->outbuf = NULL; rtpvrawdepay->timestamp = -1; } - return NULL; + return outbuf; /* ERRORS */ unknown_sampling: