gst/realmedia/rmdemux.c: Properly aggregate GstFlowReturn from downstream in order...
authorEdward Hervey <bilboed@bilboed.com>
Tue, 13 May 2008 09:33:09 +0000 (09:33 +0000)
committerEdward Hervey <bilboed@bilboed.com>
Tue, 13 May 2008 09:33:09 +0000 (09:33 +0000)
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
common
gst/realmedia/rmdemux.c

index 01b6a2d..9fce80d 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2008-05-13  Edward Hervey  <edward.hervey@collabora.co.uk>
+
+       * 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  <jan.schmidt@sun.com>
 
        * configure.ac:
diff --git a/common b/common
index dbf8f3a..2d9c09d 160000 (submodule)
--- a/common
+++ b/common
@@ -1 +1 @@
-Subproject commit dbf8f3aeceb6e57de097951a670cd853b4886ad8
+Subproject commit 2d9c09df0fe4ad3f570fea9f649cfc6c4511080d
index 450210c..4135aae 100644 (file)
@@ -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 */