Code/Resource
Windows Develop
Linux-Unix program
Internet-Socket-Network
Web Server
Browser Client
Ftp Server
Ftp Client
Browser Plugins
Proxy Server
Email Server
Email Client
WEB Mail
Firewall-Security
Telnet Server
Telnet Client
ICQ-IM-Chat
Search Engine
Sniffer Package capture
Remote Control
xml-soap-webservice
P2P
WEB(ASP,PHP,...)
TCP/IP Stack
SNMP
Grid Computing
SilverLight
DNS
Cluster Service
Network Security
Communication-Mobile
Game Program
Editor
Multimedia program
Graph program
Compiler program
Compress-Decompress algrithms
Crypt_Decrypt algrithms
Mathimatics-Numerical algorithms
MultiLanguage
Disk/Storage
Java Develop
assembly language
Applications
Other systems
Database system
Embeded-SCM Develop
FlashMX/Flex
source in ebook
Delphi VCL
OS Develop
MiddleWare
MPI
MacOS develop
LabView
ELanguage
Software/Tools
E-Books
Artical/Document
nalucommon.c
Package: chapter15.rar [view]
Upload User: hjq518
Upload Date: 2021-12-09
Package Size: 5084k
Code Size: 2k
Category:
Audio program
Development Platform:
Visual C++
- /*!
- ************************************************************************
- * file nalucommon.c
- *
- * brief
- * Common NALU support functions
- *
- * author
- * Main contributors (see contributors.h for copyright, address and affiliation details)
- * - Stephan Wenger <stewe@cs.tu-berlin.de>
- ************************************************************************
- */
- #include "global.h"
- #include "nalu.h"
- #include "memalloc.h"
- /*!
- *************************************************************************************
- * brief
- * Allocates memory for a NALU
- *
- * param buffersize
- * size of NALU buffer
- *
- * return
- * pointer to a NALU
- *************************************************************************************
- */
- NALU_t *AllocNALU(int buffersize)
- {
- NALU_t *n;
- if ((n = (NALU_t*)calloc (1, sizeof (NALU_t))) == NULL)
- no_mem_exit ("AllocNALU: n");
- n->max_size=buffersize;
- if ((n->buf = (byte*)calloc (buffersize, sizeof (byte))) == NULL)
- {
- free (n);
- no_mem_exit ("AllocNALU: n->buf");
- }
- return n;
- }
- /*!
- *************************************************************************************
- * brief
- * Frees a NALU
- *
- * param n
- * NALU to be freed
- *
- *************************************************************************************
- */
- void FreeNALU(NALU_t *n)
- {
- if (n)
- {
- if (n->buf)
- {
- free(n->buf);
- n->buf=NULL;
- }
- free (n);
- }
- }