title: Gstreamer Bus internal data flow error
body: <p>I am getting an error while receiving video from udpsource on client side:</p>
  
  <pre><code>        (Recievr:13885): GStreamer-CRITICAL **: gst_caps_get_structure: assertion `GST_IS_CAPS (caps)' failed
  
          (Recievr:13885): GStreamer-CRITICAL **: gst_structure_get_fraction: assertion `structure != NULL' failed
  
          (Recievr:13885): GStreamer-CRITICAL **: gst_caps_get_structure: assertion `GST_IS_CAPS (caps)' failed
  
          (Recievr:13885): GStreamer-CRITICAL **: gst_structure_get_fraction: assertion `structure != NULL' failed
          BUS CALL Internal data flow error.
          Returned, stopping playback
          Deleting pipeline
      Here is my code: where I tried to receive video over udp and parallely to display the video. I am using gstreamer-0.10.29 with RHEL-6.5 and forced to work with same version only.Can anybody tell me where is the problem or plz solve my problem.
  
                                             Client.c        
  
          #include &lt;stdlib.h&gt;
          #include &lt;gst/gst.h&gt;       
  </code></pre>
  
  <p>Here defining the bus </p>
  
  <pre><code>        gboolean bus_call(GstBus *bus, GstMessage *msg, void *data) 
          { 
              gchar           *debug; 
              GError          *err; 
              GMainLoop       *loop = (GMainLoop*)data;         
              switch (GST_MESSAGE_TYPE(msg)) 
              { 
                  case GST_MESSAGE_APPLICATION: 
                      g_print("APP received on OBJ NAME %s\n",GST_OBJECT_NAME(msg-&gt;src)); 
                      break; 
                  case GST_MESSAGE_EOS: 
                      g_print("EOS received on OBJ NAME %s\n",GST_OBJECT_NAME(msg-&gt;src)); 
                      g_main_loop_quit (loop); 
                      break; 
                  case GST_MESSAGE_ERROR: 
                      gst_message_parse_error(msg, &amp;err, &amp;debug); 
                      g_free(debug); 
                      g_print("BUS CALL %s\n", err-&gt;message); 
                      g_error_free(err); 
                      g_main_loop_quit (loop); 
                      break; 
                  default: 
                      break; 
              } 
              return TRUE; 
          }         
          int main(int argc, char* argv[]) 
          { 
              GMainLoop *loop; 
              gst_init(&amp;argc,&amp;argv); 
  
              loop = g_main_loop_new (NULL, FALSE);             
              GstElement  *pipeline, *vsource, *vtee, *vqueue, *tover, *xvsink, *evqueue, *vencoder, *muxer, *filesink; 
              GstCaps *filtercaps;
              GstBin      *recording; 
              GstBus      *bus; 
              GstPad      *srcpad,*sinkpad; 
             gint width, height, num, denom;
             const GstStructure *str;
  
            // Create gstreamer elements 
              pipeline   = gst_pipeline_new ("Live Recording"); 
              vsource    = gst_element_factory_make ("udpsrc","rtpsrc"); 
              vtee       = gst_element_factory_make ("tee", "viewing-tee"); 
              vqueue     = gst_element_factory_make ("queue2","viewing-queue"); 
            // vqueue     = gst_element_factory_make ("queue","viewing-queue"); 
              tover      = gst_element_factory_make ("timeoverlay","viewing-overlay"); 
    xvsink  = gst_element_factory_make ("xvimagesink","viewing-vsink");       
  
             GstElement  *filter, *vrate, *encoder, *conv, *sink;     
  
             recording  = GST_BIN(gst_bin_new("recording-bin")); 
         evqueue    = gst_element_factory_make ("queue2","encoding-queue");    
             vrate = gst_element_factory_make ("videorate", "video-rate");
             filter = gst_element_factory_make ("capsfilter", "filter");
             conv = gst_element_factory_make ("ffmpegcolorspace","converter");
             vencoder = gst_element_factory_make ("ffdec_mpeg4","mpeg-decoder");
             g_assert(vencoder);
           // sink = gst_element_factory_make ("udpsink","audio-output");        
             if(!pipeline || !vsource || !xvsink || !tover ) 
              { 
                  g_print("Unable to create all necessary elements\n"); 
                  return -1; 
              } 
  
            filtercaps = gst_caps_new_simple ("video/x-raw-yuv","width", G_TYPE_INT, 640,"height", G_TYPE_INT, 480,"framerate", GST_TYPE_FRACTION, 30, 1, NULL);        
          g_assert(filtercaps);         
  
             g_object_set (G_OBJECT (filter), "caps", filtercaps, NULL);
             gst_caps_unref (filtercaps);        
  
            // g_object_set (G_OBJECT (vencoder), "bitrate" , 384 ,  NULL);
             //g_object_set (G_OBJECT (sink), "host" , "127.0.0.1" ,  NULL);
             g_object_set (G_OBJECT (vsource), "port" , 8999 ,  NULL);
            // g_object_set (G_OBJECT (sink), "async" , FALSE ,  NULL);
  
              bus = gst_pipeline_get_bus (GST_PIPELINE (pipeline)); 
              gst_bus_add_watch (bus, bus_call, loop); 
              gst_object_unref (bus); 
  
             /* g_object_set(G_OBJECT(vsource), "num-buffers",300, NULL); 
              g_object_set(G_OBJECT(filesink),"location","output.avi", NULL);     
              g_object_set (G_OBJECT (tover), "halign", "right", NULL); 
              g_object_set (G_OBJECT (tover), "valign", "top", NULL); 
              g_object_set (G_OBJECT (tover), "shaded-background", TRUE, NULL); 
          */
            /* create the recording bin */ 
  
            //  gst_bin_add_many (recording, evqueue, vencoder, muxer, filesink, NULL); 
              //  gst_bin_add_many (recording, evqueue,vrate,filter,conv,vencoder, sink, NULL);//To be open
          gst_bin_add_many (recording, evqueue,vrate,filter,conv,vencoder, NULL);// ToBe remove for testing only     
  
              sinkpad       = gst_element_get_static_pad(evqueue,"sink"); 
              GstPad *ghost = gst_ghost_pad_new("vsink",sinkpad); 
  
              if(ghost == NULL) 
              {
                  g_error("Unable to create ghostpad!\n"); 
              }            
              gst_element_add_pad(GST_ELEMENT(recording),ghost); 
              gst_object_unref(GST_OBJECT(sinkpad));     
         // gst_element_link_many(evqueue,vencoder,muxer,filesink,NULL); 
              gst_element_link_many(evqueue,vrate,filter,conv,vencoder, sink,NULL);         
              gst_bin_add_many (GST_BIN (pipeline), vsource, vtee, vqueue, tover, xvsink, recording, NULL);             
              /* link video elements */ 
              gst_element_link_many(vsource,tover,vtee,NULL); 
              srcpad  = gst_element_get_request_pad(vtee,"src0"); 
              sinkpad = gst_element_get_pad(vqueue,"sink"); 
              gst_pad_link(srcpad,sinkpad); 
              gst_element_link(vqueue,xvsink); 
  
              /* link the viewing pipeline into the bin */ 
              srcpad  = gst_element_get_request_pad(vtee,"src1"); 
              sinkpad = gst_element_get_pad(GST_ELEMENT(recording),"vsink"); 
              gst_pad_link(srcpad,sinkpad);               
               g_print ("Running...\n");                 gst_element_set_state(pipeline,GST_STATE_PLAYING);             
             /*  str = gst_caps_get_structure (filtercaps, 0);
             if (!gst_structure_get_int (str, "width", &amp;width) || !gst_structure_get_int (str, "height", &amp;height) || 
                 !gst_structure_get_fraction (str, "framerate", &amp;num, &amp;denom))             
                   g_print ("No width/height available\n");
             g_print ("The video size of this set of capabilities is %dx%d and the frame rate is %d/%d\n", width, height, num, denom);
          */
              g_main_loop_run (loop); 
  
              /* Out of the main loop, clean up nicely */ 
              g_print ("Returned, stopping playback\n"); 
              gst_element_set_state (pipeline, GST_STATE_NULL); 
              g_print ("Deleting pipeline\n"); 
              gst_object_unref (GST_OBJECT (pipeline));             
              return 0; 
          } 
  </code></pre>