title: Gstreamer receive video: streaming task paused, reason not-negotiated (-4)
body: <p>I'm trying to transmit RTP video stream through network via UDP protocol.</p>
  
  <p>Here is pipeline code on sender side:</p>
  
  <p><a href="https://gist.github.com/mgalushka/68d8ee034849a7db4f1f234e73a41405" rel="nofollow">https://gist.github.com/mgalushka/68d8ee034849a7db4f1f234e73a41405</a></p>
  
  <p>I can receive and see actual video if I run receiver with <code>gst-launch-1.0</code> command-line like this:</p>
  
  <pre><code>gst-launch-1.0 -v udpsrc address=127.0.0.1 port=1234 caps="application/x-rtp" ! rtph263pdepay ! avdec_h263 ! autovideosink
  </code></pre>
  
  <p>But I cannot see window with video when I execute receiver for same pipeline in <strong>c</strong> code.
  Here is pipeline code on receiver side (in full - because I believe here is error somewhere):</p>
  
  <pre><code>void  _receive_video_init_gstreamer(NiceAgent *magent, guint stream_id, CustomData *data)
  {
    GstElement *pipeline, *source, *capsfilter, *videoconvert, *h263p, *rtph263pdepay, *sink;
    GstBus *bus;
    GstMessage *msg;
    GstStateChangeReturn ret;
    GSource *bus_source;
  
    source = gst_element_factory_make ("udpsrc", "source");
    rtph263pdepay = gst_element_factory_make ("rtph263pdepay", "rtph263pdepay");
    h263p = gst_element_factory_make ("avdec_h263p", "h263p");
    sink = gst_element_factory_make ("autovideosink", "sink");
  
    g_object_set (source, "address", "127.0.0.1", NULL);
    g_object_set (source, "port", 1234, NULL);
  
    g_object_set (source, "caps", gst_caps_from_string("application/x-rtp"), NULL);
  
    g_object_set (sink, "sync", FALSE, NULL);
  
    pipeline = gst_pipeline_new ("Video receive pipeline");
  
    if (!pipeline || !source ||
        !h263p || !rtph263pdepay || !sink)
    {
      g_printerr ("Not all elements could be created.\n");
      return;
    }
  
    gst_bin_add_many (GST_BIN (pipeline), source,
              rtph263pdepay, h263p, sink, NULL);
  
    if (gst_element_link_many (source,
                  rtph263pdepay, h263p, sink, NULL) != TRUE) {
      g_printerr ("Elements could not be linked.\n");
      gst_object_unref (pipeline);
      return;
    }
  
    bus = gst_element_get_bus (pipeline);
    gst_bus_enable_sync_message_emission (bus);
    gst_bus_add_signal_watch (bus);
  
    g_signal_connect (bus, "message::error",
        (GCallback) on_error, NULL);
  
    data-&gt;pipeline = pipeline;
    ret = gst_element_set_state(data-&gt;pipeline, GST_STATE_PLAYING);
  
    if (ret == GST_STATE_CHANGE_FAILURE) {
      g_printerr ("Unable to set the pipeline to the playing state.\n");
      gst_object_unref (pipeline);
      return;
    }
  }
  </code></pre>
  
  <p>Error onserved from code:</p>
  
  <pre><code>WARN    basesrc gstbasesrc.c:2943:void gst_base_src_loop(GstPad *):&lt;source&gt; error: Internal data flow error. 
  WARN    basesrc gstbasesrc.c:2943:void gst_base_src_loop(GstPad *):&lt;source&gt; error: streaming task paused, reason not-negotiated (-4) 
  ERROR   default gstreamer_utils.c:42:on_error: Error received from element source: Internal data flow error.
  </code></pre>
  
  <p>How can I debug this issue?</p>