Merge branch 'master' into 0.11
authorWim Taymans <wim.taymans@collabora.co.uk>
Thu, 7 Jul 2011 09:10:39 +0000 (11:10 +0200)
committerWim Taymans <wim.taymans@collabora.co.uk>
Thu, 7 Jul 2011 09:10:39 +0000 (11:10 +0200)
Conflicts:
gst-libs/gst/tag/gstxmptag.c
gst/encoding/gststreamsplitter.c

1  2 
gst-libs/gst/tag/gstxmptag.c
gst/encoding/gstencodebin.c
gst/encoding/gststreamsplitter.c
gst/typefind/gsttypefindfunctions.c
tests/check/libs/tag.c

@@@ -1859,15 -1848,13 +1859,15 @@@ gst_tag_list_to_xmp_buffer_full (const 
            "                " "                " "\n");
      }
    }
-   g_string_append_printf (data, "<?xpacket end=\"%c\"?>\n",
+   g_string_append_printf (data, "<?xpacket end=\"%c\"?>",
        (read_only ? 'r' : 'w'));
  
-   bsize = data->len + 1;
++  bsize = data->len;
 +  bdata = g_string_free (data, FALSE);
 +
    buffer = gst_buffer_new ();
 -  GST_BUFFER_SIZE (buffer) = data->len;
 -  GST_BUFFER_DATA (buffer) = (guint8 *) g_string_free (data, FALSE);
 -  GST_BUFFER_MALLOCDATA (buffer) = GST_BUFFER_DATA (buffer);
 +  gst_buffer_take_memory (buffer, -1,
 +      gst_memory_new_wrapped (0, bdata, g_free, bsize, 0, bsize));
  
    return buffer;
  }
@@@ -216,9 -227,12 +227,10 @@@ struct _StreamGrou
  #define DEFAULT_QUEUE_TIME_MAX     GST_SECOND
  #define DEFAULT_AUDIO_JITTER_TOLERANCE 20 * GST_MSECOND
  #define DEFAULT_AVOID_REENCODING   FALSE
+ #define DEFAULT_FLAGS              0
  
  #define DEFAULT_RAW_CAPS                      \
 -  "video/x-raw-yuv; "                         \
 -  "video/x-raw-rgb; "                         \
 -  "video/x-raw-gray; "                                \
 +  "video/x-raw; "                             \
    "audio/x-raw-int; "                         \
    "audio/x-raw-float; "                               \
    "text/plain; "                              \
@@@ -1207,7 -1261,8 +1262,8 @@@ _create_stream_group (GstEncodeBin * eb
    /* 3.2. restriction elements */
    /* FIXME : Once we have properties for specific converters, use those */
    if (GST_IS_ENCODING_VIDEO_PROFILE (sprof)) {
-     GstElement *cspace, *scale, *vrate, *cspace2;
 -    const gboolean native_video = ! !(ebin->flags & GST_ENC_FLAG_NATIVE_VIDEO);
++    const gboolean native_video = !!(ebin->flags & GST_ENC_FLAG_NATIVE_VIDEO);
+     GstElement *cspace = NULL, *scale, *vrate, *cspace2 = NULL;
  
      GST_LOG ("Adding conversion elements for video stream");
  
@@@ -280,10 -268,13 +280,13 @@@ resync
      GstPad *srcpad = (GstPad *) tmp->data;
  
      STREAMS_UNLOCK (stream_splitter);
-     if (res)
-       gst_caps_merge (res, gst_pad_peer_get_caps (srcpad, filter));
-     else
+     if (res) {
 -      GstCaps *peercaps = gst_pad_peer_get_caps_reffed (srcpad);
++      GstCaps *peercaps = gst_pad_peer_get_caps (srcpad, filter);
+       if (peercaps)
+         gst_caps_merge (res, gst_caps_make_writable (peercaps));
+     } else {
 -      res = gst_pad_peer_get_caps (srcpad);
 +      res = gst_pad_peer_get_caps (srcpad, filter);
+     }
      STREAMS_LOCK (stream_splitter);
  
      if (G_UNLIKELY (cookie != stream_splitter->cookie)) {
@@@ -4087,6 -4090,8 +4089,8 @@@ degas_type_find (GstTypeFind * tf, gpoi
      /* could be DEGAS Elite */
      if (resolution <= 2) {
        data = gst_type_find_peek (tf, len - 16, 8);
 -      return;
+       if (G_UNLIKELY (data == NULL))
++        return;
        for (n = 0; n < 4; n++) {
          if (GST_READ_UINT16_BE (data + n * 2) > 2)
            return;
         it does have 4 16 bytes values near the end that are 0-2 though. */
      if ((resolution & 0x8000) && (resolution & 0x7fff) <= 2) {
        data = gst_type_find_peek (tf, len - 16, 8);
 -      return;
+       if (G_UNLIKELY (data == NULL))
++        return;
        for (n = 0; n < 4; n++) {
          if (GST_READ_UINT16_BE (data + n * 2) > 2)
            return;
Simple merge