summaryrefslogtreecommitdiff
path: root/main
diff options
context:
space:
mode:
authorJoshua Colp <jcolp@digium.com>2017-05-08 17:25:22 -0500
committerGerrit Code Review <gerrit2@gerrit.digium.api>2017-05-08 17:25:22 -0500
commitc62b5721b33a308827233fec5f4d20f98b33c970 (patch)
treeff80ec9e517a8308de23c06ab0e4574f8c91be13 /main
parentd96f755682c16141962d0fc7914cd46263f8a961 (diff)
parent56c5c51076ac75e25130083d1358160cd27b0b8f (diff)
Merge "stream: ast_stream_clone() cannot copy the opaque user data."
Diffstat (limited to 'main')
-rw-r--r--main/stream.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/main/stream.c b/main/stream.c
index 0f2393359..804a0b8ee 100644
--- a/main/stream.c
+++ b/main/stream.c
@@ -99,6 +99,7 @@ struct ast_stream *ast_stream_clone(const struct ast_stream *stream)
{
struct ast_stream *new_stream;
size_t stream_size;
+ int idx;
if (!stream) {
return NULL;
@@ -115,6 +116,12 @@ struct ast_stream *ast_stream_clone(const struct ast_stream *stream)
ao2_ref(new_stream->formats, +1);
}
+ /* We cannot clone the opaque data because we don't know how. */
+ for (idx = 0; idx < AST_STREAM_DATA_SLOT_MAX; ++idx) {
+ new_stream->data[idx] = NULL;
+ new_stream->data_free_fn[idx] = NULL;
+ }
+
return new_stream;
}