Hello community, here is the log from the commit of package libdmapsharing for openSUSE:Factory checked in at 2013-12-24 16:05:23 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/libdmapsharing (Old) and /work/SRC/openSUSE:Factory/.libdmapsharing.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "libdmapsharing" Changes: -------- --- /work/SRC/openSUSE:Factory/libdmapsharing/libdmapsharing.changes 2013-08-16 12:21:14.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.libdmapsharing.new/libdmapsharing.changes 2013-12-24 16:05:24.000000000 +0100 @@ -1,0 +2,12 @@ +Sat Dec 21 18:51:01 UTC 2013 - [email protected] + +- Update to version 2.9.24: + + Fix clang warning (bgo#711063). + + Avoid OOB read with buggy servers (bgo#711063). + + Use strlen() instead of hard-coding string length (bgo#711063). +- Changes from version 2.9.23: + + Replace some assertions in dmap-gst-*-input-stream.c with error + handling. + + Fix daap-share.c:should_transcode(). + +------------------------------------------------------------------- Old: ---- libdmapsharing-2.9.22.tar.gz New: ---- libdmapsharing-2.9.24.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ libdmapsharing.spec ++++++ --- /var/tmp/diff_new_pack.lAdU9V/_old 2013-12-24 16:05:25.000000000 +0100 +++ /var/tmp/diff_new_pack.lAdU9V/_new 2013-12-24 16:05:25.000000000 +0100 @@ -18,7 +18,7 @@ Name: libdmapsharing -Version: 2.9.22 +Version: 2.9.24 Release: 0 Summary: Library implementing the DMAP family of protocols License: LGPL-2.1+ ++++++ libdmapsharing-2.9.22.tar.gz -> libdmapsharing-2.9.24.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libdmapsharing-2.9.22/ChangeLog new/libdmapsharing-2.9.24/ChangeLog --- old/libdmapsharing-2.9.22/ChangeLog 2013-07-30 04:51:12.000000000 +0200 +++ new/libdmapsharing-2.9.24/ChangeLog 2013-11-07 15:02:35.000000000 +0100 @@ -1,3 +1,86 @@ +commit 1da947bfbabba1567bdd9c5e2bbb082b8de7d0ec +Author: W. Michael Petullo <[email protected]> +Date: Thu Nov 7 08:56:03 2013 -0500 + + Bump version number + + Signed-off-by: W. Michael Petullo <[email protected]> + +commit 0f6010e429430867f80ed9933228d69dac783679 +Author: W. Michael Petullo <[email protected]> +Date: Thu Nov 7 08:41:50 2013 -0500 + + Update libdmapsharing.spec + + Signed-off-by: W. Michael Petullo <[email protected]> + +commit 28d26ba51dac6565a796a4e2c68ad28f89af398f +Author: Bastien Nocera <[email protected]> +Date: Tue Oct 29 11:42:31 2013 +0100 + + Fix clang warning + + dmap-md5.c:187:26: warning: 'memset' call operates on objects of type 'MD5_CTX' + while the size is based on a different + type 'MD5_CTX *' [-Wsizeof-pointer-memaccess] + memset (ctx, 0, sizeof (ctx)); /* In case it's sensitive */ + ~~~ ^~~ + + That should be "sizeof(*ctx)" instead. + + See https://bugzilla.redhat.com/show_bug.cgi?id=1023528 + + https://bugzilla.gnome.org/show_bug.cgi?id=711063 + +commit 3e347fd3e8e7e20afc562268f27fd3c2b79f4d0e +Author: Bastien Nocera <[email protected]> +Date: Tue Oct 29 11:37:15 2013 +0100 + + Avoid OOB read with buggy servers + + If the server doesn't start the Content-Range field with "bytes=" + we would have an out-of-bounds read trying to parse the content + of that field. Fall back to a 0 offset when a parsing error occurs. + + See https://bugzilla.redhat.com/show_bug.cgi?id=1024020 + + https://bugzilla.gnome.org/show_bug.cgi?id=711063 + +commit 617164b22dbbe17490377c56f8a859541e9fcfdb +Author: Bastien Nocera <[email protected]> +Date: Tue Oct 29 11:34:20 2013 +0100 + + Use strlen() instead of hard-coding string length + + This avoids hard to detect bugs when we want a different string length, + and will be optimised by the compiler anyway. + + https://bugzilla.gnome.org/show_bug.cgi?id=711063 + +commit 577b6705f5ef480721f894f1c2e79a62b36051f7 +Author: W. Michael Petullo <[email protected]> +Date: Sun Aug 25 19:52:35 2013 -0400 + + Bump version number + + Signed-off-by: W. Michael Petullo <[email protected]> + +commit 8c3fd3791a30cbe0d62f3cd9953a911fb6313e8b +Author: W. Michael Petullo <[email protected]> +Date: Tue Aug 20 22:12:37 2013 -0400 + + Replace some assertions in dmap-gst-*-input-stream.c with error handling + + Signed-off-by: W. Michael Petullo <[email protected]> + +commit 77e846271dd5df841c6156d8a5a5eb8ded32f511 +Author: W. Michael Petullo <[email protected]> +Date: Thu Aug 15 23:18:27 2013 -0400 + + Fix daap-share.c:should_transcode() + + Signed-off-by: W. Michael Petullo <[email protected]> + commit 6d7fdf43c72c8d9565ec373a27d1d241b640270d Author: W. Michael Petullo <[email protected]> Date: Mon Jul 29 22:45:32 2013 -0400 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libdmapsharing-2.9.22/configure new/libdmapsharing-2.9.24/configure --- old/libdmapsharing-2.9.22/configure 2013-07-30 04:46:19.000000000 +0200 +++ new/libdmapsharing-2.9.24/configure 2013-11-07 15:02:25.000000000 +0100 @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for libdmapsharing 2.9.22. +# Generated by GNU Autoconf 2.69 for libdmapsharing 2.9.24. # # # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. @@ -647,8 +647,8 @@ # Identity of this package. PACKAGE_NAME='libdmapsharing' PACKAGE_TARNAME='libdmapsharing' -PACKAGE_VERSION='2.9.22' -PACKAGE_STRING='libdmapsharing 2.9.22' +PACKAGE_VERSION='2.9.24' +PACKAGE_STRING='libdmapsharing 2.9.24' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1494,7 +1494,7 @@ # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures libdmapsharing 2.9.22 to adapt to many kinds of systems. +\`configure' configures libdmapsharing 2.9.24 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1564,7 +1564,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of libdmapsharing 2.9.22:";; + short | recursive ) echo "Configuration of libdmapsharing 2.9.24:";; esac cat <<\_ACEOF @@ -1734,7 +1734,7 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -libdmapsharing configure 2.9.22 +libdmapsharing configure 2.9.24 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2099,7 +2099,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by libdmapsharing $as_me 2.9.22, which was +It was created by libdmapsharing $as_me 2.9.24, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2452,20 +2452,20 @@ PACKAGE=libdmapsharing LIBDMAPSHARING_MAJOR_VERSION=2 LIBDMAPSHARING_MINOR_VERSION=9 - LIBDMAPSHARING_MICRO_VERSION=22 + LIBDMAPSHARING_MICRO_VERSION=24 NANO=LIBDMAPSHARING_CVS="no" LIBDMAPSHARING_NANO_VERSION=$NANO if test "x$NANO" = "x" || test "x$NANO" = "x0"; then { $as_echo "$as_me:${as_lineno-$LINENO}: configuring libdmapsharing for release" >&5 $as_echo "$as_me: configuring libdmapsharing for release" >&6;} - VERSION=2.9.22 + VERSION=2.9.24 LIBDMAPSHARING_RELEASE=1 LIBDMAPSHARING_CVS="yes" else { $as_echo "$as_me:${as_lineno-$LINENO}: configuring libdmapsharing for development with nano $NANO" >&5 $as_echo "$as_me: configuring libdmapsharing for development with nano $NANO" >&6;} - VERSION=2.9.22.$NANO + VERSION=2.9.24.$NANO LIBDMAPSHARING_RELEASE=`date +%Y%m%d_%H%M%S` : fi @@ -3017,7 +3017,7 @@ # Define the identity of the package. PACKAGE='libdmapsharing' - VERSION='2.9.22' + VERSION='2.9.24' cat >>confdefs.h <<_ACEOF @@ -7446,7 +7446,7 @@ rm -rf conftest* ;; -x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ +x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext @@ -7464,7 +7464,10 @@ x86_64-*linux*) LD="${LD-ld} -m elf_i386" ;; - ppc64-*linux*|powerpc64-*linux*) + powerpcle-*linux*) + LD="${LD-ld} -m elf32lppclinux" + ;; + powerpc-*linux*) LD="${LD-ld} -m elf32ppclinux" ;; s390x-*linux*) @@ -7483,7 +7486,10 @@ x86_64-*linux*) LD="${LD-ld} -m elf_x86_64" ;; - ppc*-*linux*|powerpc*-*linux*) + powerpcle-*linux*) + LD="${LD-ld} -m elf64lppc" + ;; + powerpc-*linux*) LD="${LD-ld} -m elf64ppc" ;; s390*-*linux*|s390*-*tpf*) @@ -15372,7 +15378,7 @@ # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by libdmapsharing $as_me 2.9.22, which was +This file was extended by libdmapsharing $as_me 2.9.24, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -15438,7 +15444,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -libdmapsharing config.status 2.9.22 +libdmapsharing config.status 2.9.24 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libdmapsharing-2.9.22/configure.ac new/libdmapsharing-2.9.24/configure.ac --- old/libdmapsharing-2.9.22/configure.ac 2013-07-30 04:44:31.000000000 +0200 +++ new/libdmapsharing-2.9.24/configure.ac 2013-11-07 14:55:46.000000000 +0100 @@ -1,8 +1,8 @@ -AC_INIT(libdmapsharing, 2.9.22) +AC_INIT(libdmapsharing, 2.9.24) dnl when going to/from release please set the nano (fourth number) right ! dnl releases only do Wall, cvs and prerelease does Werror too -AS_VERSION(libdmapsharing, LIBDMAPSHARING, 2, 9, 22, LIBDMAPSHARING_CVS="no", LIBDMAPSHARING_CVS="yes") +AS_VERSION(libdmapsharing, LIBDMAPSHARING, 2, 9, 24, LIBDMAPSHARING_CVS="no", LIBDMAPSHARING_CVS="yes") dnl FIXME: dnl would like to automate this off the above definitions, but API might be 2.2 with version 2.1. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libdmapsharing-2.9.22/libdmapsharing/daap-share.c new/libdmapsharing-2.9.24/libdmapsharing/daap-share.c --- old/libdmapsharing-2.9.22/libdmapsharing/daap-share.c 2013-07-05 04:26:36.000000000 +0200 +++ new/libdmapsharing-2.9.24/libdmapsharing/daap-share.c 2013-10-30 02:44:18.000000000 +0100 @@ -375,14 +375,29 @@ static gboolean should_transcode (const gchar *format, const gboolean has_video, const gchar *transcode_mimetype) { - gboolean fnval; + gboolean fnval = FALSE; char *format2 = NULL; // Not presently transcoding videos (see also same comments elsewhere). - fnval = has_video - || transcode_mimetype == NULL - || ((format2 = dmap_mime_to_format (transcode_mimetype)) && strcmp (format, format2)); + if (TRUE == has_video) { + goto done; + } + + if (NULL == transcode_mimetype) { + goto done; + } + + format2 = dmap_mime_to_format (transcode_mimetype); + if (NULL == format2) { + g_warning ("Configured to transcode, but target format is bad"); + goto done; + } + if (strcmp (format, format2)) { + fnval = TRUE; + } + +done: g_debug (" Should%s transcode %s %s", fnval ? "" : " not", format, format2 ? format2 : "[no target format]"); return fnval; @@ -528,7 +543,7 @@ } if (NULL != stream) { - g_input_stream_close (cd->stream, NULL, NULL); + g_input_stream_close (stream, NULL, NULL); } return; @@ -907,8 +922,13 @@ const gchar *s; gchar *content_range; - s = range_header + 6; /* bytes= */ - offset = atoll (s); + if (!g_ascii_strncasecmp (range_header, "bytes=", strlen("bytes="))) { + /* Not starting with "bytes=" ? */ + offset = 0; + } else { + s = range_header + strlen ("bytes="); /* bytes= */ + offset = atoll (s); + } content_range = g_strdup_printf ("bytes %" G_GUINT64_FORMAT "-%" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libdmapsharing-2.9.22/libdmapsharing/dmap-gst-mp3-input-stream.c new/libdmapsharing-2.9.24/libdmapsharing/dmap-gst-mp3-input-stream.c --- old/libdmapsharing-2.9.22/libdmapsharing/dmap-gst-mp3-input-stream.c 2013-07-25 04:30:11.000000000 +0200 +++ new/libdmapsharing-2.9.24/libdmapsharing/dmap-gst-mp3-input-stream.c 2013-08-21 03:11:38.000000000 +0200 @@ -45,18 +45,18 @@ static void pad_added_cb (GstElement * element, GstPad * pad, - DMAPGstMP3InputStream * stream) + GstElement *convert) { /* Link remaining pad after decodebin2 does its magic. */ GstPad *conv_pad; - conv_pad = gst_element_get_static_pad (stream->priv->convert, "sink"); + conv_pad = gst_element_get_static_pad (convert, "sink"); g_assert (conv_pad != NULL); if (pads_compatible (pad, conv_pad)) { g_assert (!GST_PAD_IS_LINKED (gst_element_get_static_pad - (stream->priv->convert, "sink"))); + (convert, "sink"))); gst_pad_link (pad, conv_pad); } else { @@ -69,85 +69,132 @@ { GstStateChangeReturn sret; GstState state; - DMAPGstMP3InputStream *stream; + DMAPGstMP3InputStream *stream = NULL; - stream = DMAP_GST_MP3_INPUT_STREAM (g_object_new - (DMAP_TYPE_GST_MP3_INPUT_STREAM, - NULL)); + GstElement *pipeline = NULL; + GstElement *src = NULL; + GstElement *decode = NULL; + GstElement *convert = NULL; + GstElement *audio_encode = NULL; + GstElement *sink = NULL; - stream->priv->pipeline = gst_pipeline_new ("pipeline"); + g_assert (G_IS_INPUT_STREAM (src_stream)); - stream->priv->src = gst_element_factory_make ("giostreamsrc", "src"); - g_assert (GST_IS_ELEMENT (stream->priv->src)); + pipeline = gst_pipeline_new ("pipeline"); + if (NULL == pipeline) { + g_warning ("Could not create GStreamer pipeline"); + goto done; + } - stream->priv->decode = gst_element_factory_make ("decodebin", "decode"); - g_assert (GST_IS_ELEMENT (stream->priv->decode)); + src = gst_element_factory_make ("giostreamsrc", "src"); + if (NULL == src) { + g_warning ("Could not create GStreamer giostreamsrc element"); + goto done; + } - stream->priv->convert = gst_element_factory_make ("audioconvert", "convert"); - g_assert (GST_IS_ELEMENT (stream->priv->convert)); + decode = gst_element_factory_make ("decodebin", "decode"); + if (NULL == decode) { + g_warning ("Could not create GStreamer decodebin element"); + goto done; + } - stream->priv->audio_encode = gst_element_factory_make ("lamemp3enc", "audioencode"); - g_assert (GST_IS_ELEMENT (stream->priv->audio_encode)); + convert = gst_element_factory_make ("audioconvert", "convert"); + if (NULL == convert) { + g_warning ("Could not create GStreamer audioconvert element"); + goto done; + } - stream->priv->sink = gst_element_factory_make ("appsink", "sink"); - g_assert (GST_IS_ELEMENT (stream->priv->sink)); + audio_encode = gst_element_factory_make ("lamemp3enc", "audioencode"); + if (NULL == audio_encode) { + g_warning ("Could not create GStreamer lamemp3enc element"); + goto done; + } - gst_bin_add_many (GST_BIN (stream->priv->pipeline), - stream->priv->src, - stream->priv->decode, - stream->priv->convert, - stream->priv->audio_encode, - stream->priv->sink, - NULL); + sink = gst_element_factory_make ("appsink", "sink"); + if (NULL == sink) { + g_warning ("Could not create GStreamer appsink element"); + goto done; + } - if (gst_element_link (stream->priv->src, - stream->priv->decode) == FALSE) { + gst_bin_add_many (GST_BIN (pipeline), src, decode, convert, audio_encode, sink, NULL); + + if (FALSE == gst_element_link (src, decode)) { g_warning ("Error linking source and decode elements"); + goto done; } - if (gst_element_link_many (stream->priv->convert, - stream->priv->audio_encode, - stream->priv->sink, - NULL) == FALSE) { + if (FALSE == gst_element_link_many (convert, audio_encode, sink, NULL)) { g_warning ("Error linking convert through sink elements"); + goto done; } - g_assert (G_IS_INPUT_STREAM (src_stream)); - g_object_set (G_OBJECT (stream->priv->src), "stream", src_stream, - NULL); + g_object_set (G_OBJECT (src), "stream", src_stream, NULL); /* quality=9 is important for fast, realtime transcoding: */ // FIXME: Causes crash; why? - // g_object_set (G_OBJECT (stream->priv->audio_encode), "quality", 9, NULL); - g_object_set (G_OBJECT (stream->priv->audio_encode), "bitrate", 128, NULL); - g_object_set (G_OBJECT (stream->priv->audio_encode), "vbr", 0, NULL); - g_signal_connect (stream->priv->decode, "pad-added", - G_CALLBACK (pad_added_cb), stream); - - g_object_set (G_OBJECT (stream->priv->sink), "emit-signals", TRUE, - "sync", FALSE, NULL); - gst_app_sink_set_max_buffers (GST_APP_SINK (stream->priv->sink), GST_APP_MAX_BUFFERS); - gst_app_sink_set_drop (GST_APP_SINK (stream->priv->sink), FALSE); - - g_signal_connect (stream->priv->sink, "new-sample", - G_CALLBACK (dmap_gst_input_stream_new_buffer_cb), - stream); + // g_object_set (G_OBJECT (audio_encode), "quality", 9, NULL); + g_object_set (G_OBJECT (audio_encode), "bitrate", 128, NULL); + g_object_set (G_OBJECT (audio_encode), "vbr", 0, NULL); + + g_object_set (G_OBJECT (sink), "emit-signals", TRUE, "sync", FALSE, NULL); + gst_app_sink_set_max_buffers (GST_APP_SINK (sink), GST_APP_MAX_BUFFERS); + gst_app_sink_set_drop (GST_APP_SINK (sink), FALSE); + + g_signal_connect (decode, "pad-added", G_CALLBACK (pad_added_cb), convert); /* FIXME: this technique is shared with dmapd-daap-share.c */ - sret = gst_element_set_state (stream->priv->pipeline, - GST_STATE_PLAYING); + sret = gst_element_set_state (pipeline, GST_STATE_PLAYING); if (GST_STATE_CHANGE_ASYNC == sret) { if (GST_STATE_CHANGE_SUCCESS != - gst_element_get_state (GST_ELEMENT - (stream->priv->pipeline), &state, - NULL, 5 * GST_SECOND)) { + gst_element_get_state (GST_ELEMENT (pipeline), &state, NULL, 5 * GST_SECOND)) { g_warning ("State change failed for stream."); + goto done; } } else if (sret != GST_STATE_CHANGE_SUCCESS) { g_warning ("Could not read stream."); + goto done; } + stream = DMAP_GST_MP3_INPUT_STREAM (g_object_new (DMAP_TYPE_GST_MP3_INPUT_STREAM, NULL)); + if (NULL == stream) { + goto done; + } g_assert (G_IS_SEEKABLE (stream)); + + g_signal_connect (sink, "new-sample", G_CALLBACK (dmap_gst_input_stream_new_buffer_cb), stream); + + stream->priv->pipeline = gst_object_ref (pipeline); + stream->priv->src = gst_object_ref (src); + stream->priv->decode = gst_object_ref (decode); + stream->priv->convert = gst_object_ref (convert); + stream->priv->audio_encode = gst_object_ref (audio_encode); + stream->priv->sink = gst_object_ref (sink); + +done: + if (pipeline) { + gst_object_unref (pipeline); + } + + if (src) { + gst_object_unref (src); + } + + if (decode) { + gst_object_unref (decode); + } + + if (convert) { + gst_object_unref (convert); + } + + if (audio_encode) { + gst_object_unref (audio_encode); + } + + if (sink) { + gst_object_unref (sink); + } + return G_INPUT_STREAM (stream); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libdmapsharing-2.9.22/libdmapsharing/dmap-gst-qt-input-stream.c new/libdmapsharing-2.9.24/libdmapsharing/dmap-gst-qt-input-stream.c --- old/libdmapsharing-2.9.22/libdmapsharing/dmap-gst-qt-input-stream.c 2013-06-25 03:09:57.000000000 +0200 +++ new/libdmapsharing-2.9.24/libdmapsharing/dmap-gst-qt-input-stream.c 2013-08-21 04:11:16.000000000 +0200 @@ -46,18 +46,18 @@ static void pad_added_cb (GstElement * element, GstPad * pad, - DMAPGstQtInputStream * stream) + GstElement *convert) { /* Link remaining pad after decodebin2 does its magic. */ GstPad *conv_pad; - conv_pad = gst_element_get_static_pad (stream->priv->convert, "sink"); + conv_pad = gst_element_get_static_pad (convert, "sink"); g_assert (conv_pad != NULL); if (pads_compatible (pad, conv_pad)) { g_assert (!GST_PAD_IS_LINKED (gst_element_get_static_pad - (stream->priv->convert, "sink"))); + (convert, "sink"))); gst_pad_link (pad, conv_pad); } else { @@ -70,88 +70,138 @@ { GstStateChangeReturn sret; GstState state; - DMAPGstQtInputStream *stream; + DMAPGstQtInputStream *stream = NULL; - stream = DMAP_GST_QT_INPUT_STREAM (g_object_new - (DMAP_TYPE_GST_QT_INPUT_STREAM, - NULL)); + GstElement *pipeline = NULL; + GstElement *src = NULL; + GstElement *decode = NULL; + GstElement *convert = NULL; + GstElement *audio_encode = NULL; + GstElement *mux = NULL; + GstElement *sink = NULL; - stream->priv->pipeline = gst_pipeline_new ("pipeline"); - - stream->priv->src = gst_element_factory_make ("giostreamsrc", "src"); - g_assert (GST_IS_ELEMENT (stream->priv->src)); - - stream->priv->decode = - gst_element_factory_make ("decodebin", "decode"); - g_assert (GST_IS_ELEMENT (stream->priv->decode)); - - stream->priv->convert = - gst_element_factory_make ("audioconvert", "convert"); - g_assert (GST_IS_ELEMENT (stream->priv->convert)); - - stream->priv->audio_encode = gst_element_factory_make ("avenc_aac", "audioencode"); - g_assert (GST_IS_ELEMENT (stream->priv->audio_encode)); - - stream->priv->mux = gst_element_factory_make ("qtmux", "mux"); - g_assert (GST_IS_ELEMENT (stream->priv->mux)); + g_assert (G_IS_INPUT_STREAM (src_stream)); - stream->priv->sink = gst_element_factory_make ("appsink", "sink"); - g_assert (GST_IS_ELEMENT (stream->priv->sink)); + pipeline = gst_pipeline_new ("pipeline"); + if (NULL == pipeline) { + g_warning ("Could not create GStreamer pipeline"); + goto done; + } + + src = gst_element_factory_make ("giostreamsrc", "src"); + if (NULL == src) { + g_warning ("Could not create GStreamer giostreamsrc element"); + goto done; + } + + decode = gst_element_factory_make ("decodebin", "decode"); + if (NULL == decode) { + g_warning ("Could not create GStreamer decodebin element"); + goto done; + } + + convert = gst_element_factory_make ("audioconvert", "convert"); + if (NULL == convert) { + g_warning ("Could not create GStreamer audioconvert element"); + goto done; + } + + audio_encode = gst_element_factory_make ("avenc_aac", "audioencode"); + if (NULL == audio_encode) { + g_warning ("Could not create GStreamer avenc_aac element"); + goto done; + } + + mux = gst_element_factory_make ("qtmux", "mux"); + if (NULL == audio_encode) { + g_warning ("Could not create GStreamer qtmux element"); + goto done; + } + + sink = gst_element_factory_make ("appsink", "sink"); + if (NULL == sink) { + g_warning ("Could not create GStreamer appsink element"); + goto done; + } - gst_bin_add_many (GST_BIN (stream->priv->pipeline), - stream->priv->src, - stream->priv->decode, - stream->priv->convert, - stream->priv->audio_encode, - stream->priv->mux, - stream->priv->sink, - NULL); + gst_bin_add_many (GST_BIN (pipeline), src, decode, convert, audio_encode, mux, sink, NULL); - if (gst_element_link (stream->priv->src, - stream->priv->decode) == FALSE) { + if (FALSE == gst_element_link (stream->priv->src, stream->priv->decode)) { g_warning ("Error linking source and decode elements"); + goto done; } - if (gst_element_link_many (stream->priv->convert, - stream->priv->audio_encode, - stream->priv->mux, - stream->priv->sink, - NULL) == FALSE) { + if (FALSE == gst_element_link_many (convert, audio_encode, mux, sink, NULL)) { g_warning ("Error linking convert through sink elements"); + goto done; } - g_assert (G_IS_INPUT_STREAM (src_stream)); - g_object_set (G_OBJECT (stream->priv->src), "stream", src_stream, - NULL); + g_object_set (G_OBJECT (src), "stream", src_stream, NULL); - g_signal_connect (stream->priv->decode, "pad-added", - G_CALLBACK (pad_added_cb), stream); + g_object_set (G_OBJECT (sink), "emit-signals", TRUE, "sync", FALSE, NULL); + gst_app_sink_set_max_buffers (GST_APP_SINK (sink), GST_APP_MAX_BUFFERS); + gst_app_sink_set_drop (GST_APP_SINK (sink), FALSE); - g_object_set (G_OBJECT (stream->priv->sink), "emit-signals", TRUE, - "sync", FALSE, NULL); - gst_app_sink_set_max_buffers (GST_APP_SINK (stream->priv->sink), - GST_APP_MAX_BUFFERS); - gst_app_sink_set_drop (GST_APP_SINK (stream->priv->sink), FALSE); - - g_signal_connect (stream->priv->sink, "new-sample", - G_CALLBACK (dmap_gst_input_stream_new_buffer_cb), - stream); + g_signal_connect (decode, "pad-added", G_CALLBACK (pad_added_cb), convert); /* FIXME: this technique is shared with dmapd-daap-share.c */ - sret = gst_element_set_state (stream->priv->pipeline, - GST_STATE_PLAYING); + sret = gst_element_set_state (pipeline, GST_STATE_PLAYING); if (GST_STATE_CHANGE_ASYNC == sret) { if (GST_STATE_CHANGE_SUCCESS != - gst_element_get_state (GST_ELEMENT - (stream->priv->pipeline), &state, - NULL, 5 * GST_SECOND)) { + gst_element_get_state (GST_ELEMENT (pipeline), &state, NULL, 5 * GST_SECOND)) { g_warning ("State change failed for stream."); + goto done; } } else if (sret != GST_STATE_CHANGE_SUCCESS) { g_warning ("Could not read stream."); + goto done; } - g_assert (G_IS_SEEKABLE (stream)); + stream = DMAP_GST_QT_INPUT_STREAM (g_object_new (DMAP_TYPE_GST_QT_INPUT_STREAM, NULL)); + if (NULL == stream) { + goto done; + } + g_assert (G_IS_SEEKABLE (stream)); + + g_signal_connect (sink, "new-sample", G_CALLBACK (dmap_gst_input_stream_new_buffer_cb), stream); + + stream->priv->pipeline = gst_object_ref (pipeline); + stream->priv->src = gst_object_ref (src); + stream->priv->decode = gst_object_ref (decode); + stream->priv->convert = gst_object_ref (convert); + stream->priv->audio_encode = gst_object_ref (audio_encode); + stream->priv->mux = gst_object_ref (mux); + stream->priv->sink = gst_object_ref (sink); + +done: + if (pipeline) { + gst_object_unref (pipeline); + } + + if (src) { + gst_object_unref (src); + } + + if (decode) { + gst_object_unref (decode); + } + + if (convert) { + gst_object_unref (convert); + } + + if (audio_encode) { + gst_object_unref (audio_encode); + } + + if (mux) { + gst_object_unref (mux); + } + + if (sink) { + gst_object_unref (sink); + } + return G_INPUT_STREAM (stream); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libdmapsharing-2.9.22/libdmapsharing/dmap-gst-wav-input-stream.c new/libdmapsharing-2.9.24/libdmapsharing/dmap-gst-wav-input-stream.c --- old/libdmapsharing-2.9.22/libdmapsharing/dmap-gst-wav-input-stream.c 2013-06-24 20:49:43.000000000 +0200 +++ new/libdmapsharing-2.9.24/libdmapsharing/dmap-gst-wav-input-stream.c 2013-08-21 03:21:14.000000000 +0200 @@ -46,18 +46,18 @@ static void pad_added_cb (GstElement * element, GstPad * pad, - DMAPGstWAVInputStream * stream) + GstElement *convert) { /* Link remaining pad after decodebin2 does its magic. */ GstPad *conv_pad; - conv_pad = gst_element_get_static_pad (stream->priv->convert, "sink"); + conv_pad = gst_element_get_static_pad (convert, "sink"); g_assert (conv_pad != NULL); if (pads_compatible (pad, conv_pad)) { g_assert (!GST_PAD_IS_LINKED (gst_element_get_static_pad - (stream->priv->convert, "sink"))); + (convert, "sink"))); gst_pad_link (pad, conv_pad); } else { @@ -70,92 +70,147 @@ { GstStateChangeReturn sret; GstState state; - DMAPGstWAVInputStream *stream; + DMAPGstWAVInputStream *stream = NULL; - stream = DMAP_GST_WAV_INPUT_STREAM (g_object_new - (DMAP_TYPE_GST_WAV_INPUT_STREAM, - NULL)); - - stream->priv->pipeline = gst_pipeline_new ("pipeline"); - - stream->priv->src = gst_element_factory_make ("giostreamsrc", "src"); - g_assert (GST_IS_ELEMENT (stream->priv->src)); - - stream->priv->decode = - gst_element_factory_make ("decodebin", "decode"); - g_assert (GST_IS_ELEMENT (stream->priv->decode)); - - stream->priv->convert = - gst_element_factory_make ("audioconvert", "convert"); - g_assert (GST_IS_ELEMENT (stream->priv->convert)); + GstElement *pipeline = NULL; + GstElement *src = NULL; + GstElement *decode = NULL; + GstElement *convert = NULL; + GstCaps *filter = NULL; + GstElement *audio_encode = NULL; + GstElement *sink = NULL; + + g_assert (G_IS_INPUT_STREAM (src_stream)); + + pipeline = gst_pipeline_new ("pipeline"); + if (NULL == pipeline) { + g_warning ("Could not create GStreamer pipeline"); + goto done; + } + + src = gst_element_factory_make ("giostreamsrc", "src"); + if (NULL == src) { + g_warning ("Could not create GStreamer giostreamsrc element"); + goto done; + } + + decode = gst_element_factory_make ("decodebin", "decode"); + if (NULL == decode) { + g_warning ("Could not create GStreamer decodebin element"); + goto done; + } + + convert = gst_element_factory_make ("audioconvert", "convert"); + if (NULL == convert) { + g_warning ("Could not create GStreamer audioconvert element"); + goto done; + } + /* FIXME: This needs to be retested with Roku hardware after GStreamer 1.0 upgrade. */ /* Roku clients support a subset of the WAV format. */ - stream->priv->filter = gst_caps_new_simple ("audio/x-raw-int", - "channels", G_TYPE_INT, 2, - "width", G_TYPE_INT, 16, - "depth", G_TYPE_INT, 16, - NULL); - stream->priv->audio_encode = gst_element_factory_make ("wavenc", "audioencode"); - g_assert (GST_IS_ELEMENT (stream->priv->audio_encode)); - - stream->priv->sink = gst_element_factory_make ("appsink", "sink"); - g_assert (GST_IS_ELEMENT (stream->priv->sink)); - - gst_bin_add_many (GST_BIN (stream->priv->pipeline), - stream->priv->src, - stream->priv->decode, - stream->priv->convert, - stream->priv->audio_encode, - stream->priv->sink, - NULL); - - if (gst_element_link (stream->priv->src, - stream->priv->decode) == FALSE) { - g_warning ("Error linking source through decode elements"); - } - - if (gst_element_link_filtered (stream->priv->convert, - stream->priv->audio_encode, - stream->priv->filter) == FALSE) { + filter = gst_caps_new_simple ("audio/x-raw", + "format", G_TYPE_STRING, "S16LE", + "channels", G_TYPE_INT, 2, + /* Pre-GStreamer 1.0 "width", G_TYPE_INT, 16, + * "depth", G_TYPE_INT, 16, + */ + NULL); + + audio_encode = gst_element_factory_make ("wavenc", "audioencode"); + if (NULL == audio_encode) { + g_warning ("Could not create GStreamer wavenc element"); + goto done; + } + + sink = gst_element_factory_make ("appsink", "sink"); + if (NULL == sink) { + g_warning ("Could not create GStreamer appsink element"); + goto done; + } + + gst_bin_add_many (GST_BIN (pipeline), src, decode, convert, audio_encode, sink, NULL); + + if (FALSE == gst_element_link (src, decode)) { + g_warning ("Error linking source and decode elements"); + goto done; + } + + if (FALSE == gst_element_link_filtered (convert, audio_encode, filter)) { g_warning ("Error linking convert and audioencode elements"); + goto done; } - if (gst_element_link (stream->priv->audio_encode, - stream->priv->sink) == FALSE) { + if (FALSE == gst_element_link (audio_encode, sink)) { g_warning ("Error linking audioencode and sink elements"); + goto done; } - g_object_set (G_OBJECT (stream->priv->src), "stream", src_stream, - NULL); + g_object_set (G_OBJECT (src), "stream", src_stream, NULL); - g_signal_connect (stream->priv->decode, "pad-added", - G_CALLBACK (pad_added_cb), stream); + g_object_set (G_OBJECT (sink), "emit-signals", TRUE, "sync", FALSE, NULL); + gst_app_sink_set_max_buffers (GST_APP_SINK (sink), GST_APP_MAX_BUFFERS); + gst_app_sink_set_drop (GST_APP_SINK (sink), FALSE); - g_object_set (G_OBJECT (stream->priv->sink), "emit-signals", TRUE, - "sync", FALSE, NULL); - gst_app_sink_set_max_buffers (GST_APP_SINK (stream->priv->sink), - GST_APP_MAX_BUFFERS); - gst_app_sink_set_drop (GST_APP_SINK (stream->priv->sink), FALSE); - - g_signal_connect (stream->priv->sink, "new-buffer", - G_CALLBACK (dmap_gst_input_stream_new_buffer_cb), - stream); + g_signal_connect (decode, "pad-added", G_CALLBACK (pad_added_cb), convert); /* FIXME: this technique is shared with dmapd-daap-share.c */ - sret = gst_element_set_state (stream->priv->pipeline, - GST_STATE_PLAYING); + sret = gst_element_set_state (pipeline, GST_STATE_PLAYING); if (GST_STATE_CHANGE_ASYNC == sret) { if (GST_STATE_CHANGE_SUCCESS != - gst_element_get_state (GST_ELEMENT - (stream->priv->pipeline), &state, - NULL, 5 * GST_SECOND)) { + gst_element_get_state (GST_ELEMENT (pipeline), &state, NULL, 5 * GST_SECOND)) { g_warning ("State change failed for stream."); + goto done; } } else if (sret != GST_STATE_CHANGE_SUCCESS) { g_warning ("Could not read stream."); + goto done; } - g_assert (G_IS_SEEKABLE (stream)); + stream = DMAP_GST_WAV_INPUT_STREAM (g_object_new (DMAP_TYPE_GST_WAV_INPUT_STREAM, NULL)); + if (NULL == stream) { + goto done; + } + g_assert (G_IS_SEEKABLE (stream)); + + g_signal_connect (sink, "new-sample", G_CALLBACK (dmap_gst_input_stream_new_buffer_cb), stream); + + stream->priv->pipeline = gst_object_ref (pipeline); + stream->priv->src = gst_object_ref (src); + stream->priv->decode = gst_object_ref (decode); + stream->priv->convert = gst_object_ref (convert); + stream->priv->filter = gst_caps_ref (filter); + stream->priv->audio_encode = gst_object_ref (audio_encode); + stream->priv->sink = gst_object_ref (sink); + +done: + if (pipeline) { + gst_object_unref (pipeline); + } + + if (src) { + gst_object_unref (src); + } + + if (decode) { + gst_object_unref (decode); + } + + if (convert) { + gst_object_unref (convert); + } + + if (filter) { + gst_caps_unref (filter); + } + + if (audio_encode) { + gst_object_unref (audio_encode); + } + + if (sink) { + gst_object_unref (sink); + } + return G_INPUT_STREAM (stream); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libdmapsharing-2.9.22/libdmapsharing/dmap-md5.c new/libdmapsharing-2.9.24/libdmapsharing/dmap-md5.c --- old/libdmapsharing-2.9.22/libdmapsharing/dmap-md5.c 2013-07-18 05:28:06.000000000 +0200 +++ new/libdmapsharing-2.9.24/libdmapsharing/dmap-md5.c 2013-10-30 02:46:02.000000000 +0100 @@ -176,7 +176,7 @@ MD5Transform (ctx->buf, (guint32 *) ctx->in, ctx->version); byteReverse ((unsigned char *) ctx->buf, 4); memcpy (digest, ctx->buf, 16); - memset (ctx, 0, sizeof (ctx)); /* In case it's sensitive */ + memset (ctx, 0, sizeof (*ctx)); /* In case it's sensitive */ return; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libdmapsharing-2.9.22/libdmapsharing-3.0-uninstalled.pc new/libdmapsharing-2.9.24/libdmapsharing-3.0-uninstalled.pc --- old/libdmapsharing-2.9.22/libdmapsharing-3.0-uninstalled.pc 2013-07-30 04:51:12.000000000 +0200 +++ new/libdmapsharing-2.9.24/libdmapsharing-3.0-uninstalled.pc 2013-11-07 15:02:34.000000000 +0100 @@ -5,7 +5,7 @@ Name: libdmapsharing Description: libdmapsharing -Version: 2.9.22 +Version: 2.9.24 Requires: glib-2.0 libsoup-2.4 gstreamer-1.0 Libs: -L${libdir} -ldmapsharing-3.0 Cflags: -I${includedir} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libdmapsharing-2.9.22/m4/libtool.m4 new/libdmapsharing-2.9.24/m4/libtool.m4 --- old/libdmapsharing-2.9.22/m4/libtool.m4 2013-06-04 09:27:29.000000000 +0200 +++ new/libdmapsharing-2.9.24/m4/libtool.m4 2013-10-17 19:50:40.000000000 +0200 @@ -1312,7 +1312,7 @@ rm -rf conftest* ;; -x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ +x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext @@ -1326,7 +1326,10 @@ x86_64-*linux*) LD="${LD-ld} -m elf_i386" ;; - ppc64-*linux*|powerpc64-*linux*) + powerpcle-*linux*) + LD="${LD-ld} -m elf32lppclinux" + ;; + powerpc-*linux*) LD="${LD-ld} -m elf32ppclinux" ;; s390x-*linux*) @@ -1345,7 +1348,10 @@ x86_64-*linux*) LD="${LD-ld} -m elf_x86_64" ;; - ppc*-*linux*|powerpc*-*linux*) + powerpcle-*linux*) + LD="${LD-ld} -m elf64lppc" + ;; + powerpc-*linux*) LD="${LD-ld} -m elf64ppc" ;; s390*-*linux*|s390*-*tpf*) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libdmapsharing-2.9.22/tests/test-dmap-client.c new/libdmapsharing-2.9.24/tests/test-dmap-client.c --- old/libdmapsharing-2.9.22/tests/test-dmap-client.c 2013-07-05 17:13:09.000000000 +0200 +++ new/libdmapsharing-2.9.24/tests/test-dmap-client.c 2013-08-12 04:41:52.000000000 +0200 @@ -39,14 +39,16 @@ static void print_record (gpointer id, DMAPRecord *record, gpointer user_data) { - gchar *artist, *title; + gboolean has_video; + gchar *artist, *title; g_object_get (record, - "songartist", &artist, - "title", &title, - NULL); + "has-video", &has_video, + "songartist", &artist, + "title", &title, + NULL); - g_print ("%d: %s %s\n", GPOINTER_TO_UINT (id), artist, title); + g_print ("%d: %s %s (has video: %s)\n", GPOINTER_TO_UINT (id), artist, title, has_video ? "Y" : "N"); g_free (artist); g_free (title); -- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
