[svn-commits] file: branch group/media_formats r407399 - /team/group/media_formats/main/

SVN commits to the Digium repositories svn-commits at lists.digium.com
Wed Feb 5 07:18:55 CST 2014


Author: file
Date: Wed Feb  5 07:18:54 2014
New Revision: 407399

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=407399
Log:
Add proper refcounting to the nativeformats capabilities.

Modified:
    team/group/media_formats/main/channel_internal_api.c

Modified: team/group/media_formats/main/channel_internal_api.c
URL: http://svnview.digium.com/svn/asterisk/team/group/media_formats/main/channel_internal_api.c?view=diff&rev=407399&r1=407398&r2=407399
==============================================================================
--- team/group/media_formats/main/channel_internal_api.c (original)
+++ team/group/media_formats/main/channel_internal_api.c Wed Feb  5 07:18:54 2014
@@ -802,11 +802,12 @@
 }
 struct ast_format_cap *ast_channel_nativeformats(const struct ast_channel *chan)
 {
-	return chan->nativeformats;
+	return ao2_bump(chan->nativeformats);
 }
 void ast_channel_nativeformats_set(struct ast_channel *chan, struct ast_format_cap *value)
 {
-	chan->nativeformats = value;
+	ao2_cleanup(chan->nativeformats);
+	chan->nativeformats = ao2_bump(value);
 }
 struct ast_framehook_list *ast_channel_framehooks(const struct ast_channel *chan)
 {




More information about the svn-commits mailing list