+ payload_buf = gst_adapter_take_buffer_fast (rtph263ppay->adapter, towrite);
+ gst_rtp_copy_video_meta (rtph263ppay, outbuf, payload_buf);
+ outbuf = gst_buffer_append (outbuf, payload_buf);
+ avail -= towrite;
+
+ /* If more data is available and this is our first iteration,
+ * we create a buffer list and remember that we're fragmented.
+ *
+ * If we're fragmented already, add buffers to the previously
+ * created buffer list.
+ *
+ * Otherwise fragmented will be FALSE and we just push the single output
+ * buffer, and no list is allocated.
+ */
+ if (avail && !fragmented) {
+ fragmented = TRUE;
+ list = gst_buffer_list_new ();
+ gst_buffer_list_add (list, outbuf);
+ } else if (fragmented) {
+ gst_buffer_list_add (list, outbuf);
+ }
+ }