From 826629a9b081b0f8b8aef4efcd097cc275e39742 Mon Sep 17 00:00:00 2001 From: Edward Hervey Date: Tue, 13 May 2008 09:33:09 +0000 Subject: [PATCH] gst/realmedia/rmdemux.c: Properly aggregate GstFlowReturn from downstream in order to properly stop, and doing that a... Original commit message from CVS: * gst/realmedia/rmdemux.c: (gst_rmdemux_parse_video_packet): Properly aggregate GstFlowReturn from downstream in order to properly stop, and doing that as early as possible. Fixes #532807 --- ChangeLog | 7 +++++++ common | 2 +- gst/realmedia/rmdemux.c | 8 ++++++-- 3 files changed, 14 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 01b6a2d..9fce80d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2008-05-13 Edward Hervey + + * gst/realmedia/rmdemux.c: (gst_rmdemux_parse_video_packet): + Properly aggregate GstFlowReturn from downstream in order to properly + stop, and doing that as early as possible. + Fixes #532807 + 2008-05-10 Jan Schmidt * configure.ac: diff --git a/common b/common index dbf8f3a..2d9c09d 160000 --- a/common +++ b/common @@ -1 +1 @@ -Subproject commit dbf8f3aeceb6e57de097951a670cd853b4886ad8 +Subproject commit 2d9c09df0fe4ad3f570fea9f649cfc6c4511080d diff --git a/gst/realmedia/rmdemux.c b/gst/realmedia/rmdemux.c index 450210c..4135aae 100644 --- a/gst/realmedia/rmdemux.c +++ b/gst/realmedia/rmdemux.c @@ -2139,6 +2139,9 @@ gst_rmdemux_parse_video_packet (GstRMDemux * rmdemux, GstRMDemuxStream * stream, base = GST_BUFFER_DATA (in); data = base + offset; size = GST_BUFFER_SIZE (in) - offset; + /* if size <= 2, we want this method to return the same GstFlowReturn as it + * was previously for that given stream. */ + ret = stream->last_flow; while (size > 2) { guint8 pkg_header; @@ -2283,6 +2286,9 @@ gst_rmdemux_parse_video_packet (GstRMDemux * rmdemux, GstRMDemuxStream * stream, GST_BUFFER_TIMESTAMP (out) = timestamp; ret = gst_pad_push (stream->pad, out); + ret = gst_rmdemux_combine_flows (rmdemux, stream, ret); + if (ret != GST_FLOW_OK) + break; timestamp = GST_CLOCK_TIME_NONE; } @@ -2293,8 +2299,6 @@ gst_rmdemux_parse_video_packet (GstRMDemux * rmdemux, GstRMDemuxStream * stream, gst_buffer_unref (in); - ret = GST_FLOW_OK; - return ret; /* ERRORS */ -- 2.7.4