aboutsummaryrefslogtreecommitdiffstats
path: root/modules/audio-inline
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2013-05-18 23:24:40 +0800
committerMatthew Barnes <mbarnes@redhat.com>2013-05-20 01:07:20 +0800
commitf19058ea7a002e8ebf8351c55a86d3bb17a46cbc (patch)
tree0fdbb2c62ba31e92094ef7da2956f7caedd4840d /modules/audio-inline
parent5ad0b6d8f7ee9244eb328b5951b98f8945e7b3cf (diff)
downloadgsoc2013-evolution-f19058ea7a002e8ebf8351c55a86d3bb17a46cbc.tar.gz
gsoc2013-evolution-f19058ea7a002e8ebf8351c55a86d3bb17a46cbc.tar.zst
gsoc2013-evolution-f19058ea7a002e8ebf8351c55a86d3bb17a46cbc.zip
Add e_mail_part_ref_mime_part().
Diffstat (limited to 'modules/audio-inline')
-rw-r--r--modules/audio-inline/e-mail-formatter-audio-inline.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/modules/audio-inline/e-mail-formatter-audio-inline.c b/modules/audio-inline/e-mail-formatter-audio-inline.c
index 9c477bd2c8..3545efd3d4 100644
--- a/modules/audio-inline/e-mail-formatter-audio-inline.c
+++ b/modules/audio-inline/e-mail-formatter-audio-inline.c
@@ -176,6 +176,7 @@ play_clicked (GtkWidget *button,
if (!part->filename) {
CamelStream *stream;
CamelDataWrapper *data;
+ CamelMimePart *mime_part;
GError *error = NULL;
gint argc = 1;
const gchar *argv[] = { "org_gnome_audio_inline", NULL };
@@ -187,9 +188,11 @@ play_clicked (GtkWidget *button,
stream = camel_stream_fs_new_with_name (
part->filename, O_RDWR | O_CREAT | O_TRUNC, 0600, NULL);
- data = camel_medium_get_content (CAMEL_MEDIUM (part->parent.part));
+ mime_part = e_mail_part_ref_mime_part (E_MAIL_PART (part));
+ data = camel_medium_get_content (CAMEL_MEDIUM (mime_part));
camel_data_wrapper_decode_to_stream_sync (data, stream, NULL, NULL);
camel_stream_flush (stream, NULL, NULL);
+ g_object_unref (mime_part);
g_object_unref (stream);
d (printf ("audio inline formatter: init gst playbin\n"));