[asterisk-commits] file: branch group/media_formats r407400 - in /team/group/media_formats: incl...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Wed Feb 5 07:24:57 CST 2014


Author: file
Date: Wed Feb  5 07:24:49 2014
New Revision: 407400

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=407400
Log:
Store a pointer to the format on the frame instead of a complete format structure.

Eh, er, uh. Did I just reduce the size of frames by like 300 bytes? I think I did.

Modified:
    team/group/media_formats/include/asterisk/frame.h
    team/group/media_formats/main/frame.c

Modified: team/group/media_formats/include/asterisk/frame.h
URL: http://svnview.digium.com/svn/asterisk/team/group/media_formats/include/asterisk/frame.h?view=diff&rev=407400&r1=407399&r2=407400
==============================================================================
--- team/group/media_formats/include/asterisk/frame.h (original)
+++ team/group/media_formats/include/asterisk/frame.h Wed Feb  5 07:24:49 2014
@@ -131,7 +131,7 @@
 
 union ast_frame_subclass {
 	int integer;
-	struct ast_format format;
+	struct ast_format *format;
 };
 
 /*! \brief Data structure associated with a single frame of data

Modified: team/group/media_formats/main/frame.c
URL: http://svnview.digium.com/svn/asterisk/team/group/media_formats/main/frame.c?view=diff&rev=407400&r1=407399&r2=407400
==============================================================================
--- team/group/media_formats/main/frame.c (original)
+++ team/group/media_formats/main/frame.c Wed Feb  5 07:24:49 2014
@@ -117,6 +117,10 @@
 
 static void __frame_free(struct ast_frame *fr, int cache)
 {
+	if ((fr->frametype == AST_FRAME_VOICE) || (fr->frametype == AST_FRAME_VIDEO)) {
+		ao2_cleanup(fr->subclass.format);
+	}
+
 	if (!fr->mallocd)
 		return;
 




More information about the asterisk-commits mailing list