avpacket.c File Reference
#include <string.h>
#include "libavutil/avassert.h"
#include "libavutil/mem.h"
#include "avcodec.h"

Go to the source code of this file.

Macros

#define DUP_DATA(dst, src, size, padding)
 

Functions

void av_destruct_packet (AVPacket *pkt)
 Default packet destructor. More...
 
void av_init_packet (AVPacket *pkt)
 Initialize optional fields of a packet with default values. More...
 
int av_new_packet (AVPacket *pkt, int size)
 Allocate the payload of a packet and initialize its fields with default values. More...
 
void av_shrink_packet (AVPacket *pkt, int size)
 Reduce packet size, correctly zeroing padding. More...
 
int av_grow_packet (AVPacket *pkt, int grow_by)
 Increase packet size, correctly zeroing padding. More...
 
int av_dup_packet (AVPacket *pkt)
 
void av_free_packet (AVPacket *pkt)
 Free a packet. More...
 
uint8_tav_packet_new_side_data (AVPacket *pkt, enum AVPacketSideDataType type, int size)
 Allocate new information of a packet. More...
 
uint8_tav_packet_get_side_data (AVPacket *pkt, enum AVPacketSideDataType type, int *size)
 Get side information from packet. More...
 
int av_packet_shrink_side_data (AVPacket *pkt, enum AVPacketSideDataType type, int size)
 Shrink the already allocated side data buffer. More...
 

Macro Definition Documentation

#define DUP_DATA (   dst,
  src,
  size,
  padding 
)
Value:
do { \
if (padding) { \
if ((unsigned)(size) > \
goto failed_alloc; \
} else { \
} \
if (!data) \
goto failed_alloc; \
memcpy(data, src, size); \
if (padding) \
memset((uint8_t *)data + size, 0, \
dst = data; \
} while (0)
void * av_malloc(size_t size)
Allocate a block of size bytes with alignment suitable for all memory accesses (including vectors if ...
Definition: mem.c:61
int size
uint8_t
const char data[16]
Definition: mxf.c:66
static void(WINAPI *cond_broadcast)(pthread_cond_t *cond)
if(!(ptr_align%ac->ptr_align)&&samples_align >=aligned_len)

Definition at line 102 of file avpacket.c.

Referenced by av_dup_packet().