[Bug 750104] [PATCH] rtmpsink: Do not crash when receiving buffers after GST_FLOW_ERROR

GStreamer (GNOME Bugzilla) bugzilla at gnome.org
Fri May 29 06:32:51 PDT 2015


https://bugzilla.gnome.org/show_bug.cgi?id=750104

Jan Schmidt <thaytan at noraisin.net> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #304256|none                        |needs-work
             status|                            |

--- Comment #1 from Jan Schmidt <thaytan at noraisin.net> ---
Review of attachment 304256:
 --> (https://bugzilla.gnome.org/review?bug=750104&attachment=304256)

Thanks! good catch. A couple of comments.

::: ext/rtmp/gstrtmpsink.c
@@ +187,1 @@


I think this would be better if it were named "have_write_error"  and the logic
inverted.

@@ +220,3 @@
+    GST_ELEMENT_ERROR (sink, RESOURCE, WRITE, (NULL), ("Failed to write
data"));
+    return GST_FLOW_ERROR;
+  }

This should definitely go in as-is - silly oversight  setting the rtmp object
to null on a connect error . I'm surprised more people haven't complained.

@@ +256,3 @@
   }

+  if (sink->keep_pushing) {

Just check the condition and jump to write_error to minimise the diff

@@ +403,3 @@
+static GstStateChangeReturn
+gst_rtmp_sink_change_state (GstElement * element, GstStateChange transition)
+{

This change_state function is unnecessary - the variable will already be set in
start() above.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.


More information about the gstreamer-bugs mailing list