summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorNirbheek Chauhan <nirbheek@centricular.com>2014-07-14 09:54:58 (GMT)
committerNirbheek Chauhan <nirbheek@centricular.com>2014-07-14 10:05:31 (GMT)
commite1bdda4b97983368caa608857fb9030d72e4c8a3 (patch)
treefe522f5acfb887f4c8205a0480009457dc8f80af /src
parentde7a28eeddb893c32f6e8ac9f46e43e3cd1be524 (diff)
downloadsoup-transcoding-proxy-e1bdda4b97983368caa608857fb9030d72e4c8a3.zip
soup-transcoding-proxy-e1bdda4b97983368caa608857fb9030d72e4c8a3.tar.gz
write-chunks: Use gst_buffer_map instead of gst_memory_map
Short-cut. Pointed out in a review by slomo.
Diffstat (limited to 'src')
-rw-r--r--src/main.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/main.c b/src/main.c
index 8067b52..000c6ba 100644
--- a/src/main.c
+++ b/src/main.c
@@ -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);