diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/main.c | 7 |
1 files changed, 2 insertions, 5 deletions
@@ -122,7 +122,6 @@ write_client_chunk_cb (GstElement *appsink, GstMapInfo info; GstSample *sample; GstBuffer *buffer; - GstMemory *memory; gboolean eos; if (!g_mutex_trylock (&ctx->can_write_chunk)) { @@ -148,14 +147,12 @@ write_client_chunk_cb (GstElement *appsink, } buffer = gst_sample_get_buffer (sample); - memory = gst_buffer_get_all_memory (buffer); /* copy */ - gst_memory_map (memory, &info, GST_MAP_READ); + gst_buffer_map (buffer, &info, GST_MAP_READ); soup_message_body_append (ctx->msg->response_body, SOUP_MEMORY_COPY, info.data, info.size); /* copy */ - gst_memory_unmap (memory, &info); - gst_memory_unref (memory); + gst_buffer_unmap (buffer, &info); gst_sample_unref (sample); soup_server_unpause_message (server, ctx->msg); |