Functions

libavcodec/avpacket.c File Reference

#include "avcodec.h"
#include "libavutil/avassert.h"
#include "bytestream.h"

Go to the source code of this file.

Functions

void av_destruct_packet_nofree (AVPacket *pkt)
void av_destruct_packet (AVPacket *pkt)
 Default packet destructor.
void av_init_packet (AVPacket *pkt)
 Initialize optional fields of a packet with default values.
int av_new_packet (AVPacket *pkt, int size)
 Allocate the payload of a packet and initialize its fields with default values.
void av_shrink_packet (AVPacket *pkt, int size)
 Reduce packet size, correctly zeroing padding.
int av_grow_packet (AVPacket *pkt, int grow_by)
 Increase packet size, correctly zeroing padding.
int av_dup_packet (AVPacket *pkt)
void av_free_packet (AVPacket *pkt)
 Free a packet.

Function Documentation

void av_destruct_packet ( AVPacket pkt  ) 

Default packet destructor.

Definition at line 31 of file avpacket.c.

Referenced by a64_write_trailer(), dshow_read_close(), matroska_merge_packets(), mkv_write_trailer(), and vfw_read_close().

void av_destruct_packet_nofree ( AVPacket pkt  ) 
Deprecated:
use NULL instead

Definition at line 26 of file avpacket.c.

Referenced by av_dup_packet().

int av_dup_packet ( AVPacket pkt  ) 
Warning:
This is a hack - the packet memory allocation stuff is broken. The packet is allocated if it was not really allocated.

Definition at line 92 of file avpacket.c.

Referenced by packet_queue_put().

void av_free_packet ( AVPacket pkt  ) 
int av_grow_packet ( AVPacket pkt,
int  grow_by 
)

Increase packet size, correctly zeroing padding.

Parameters:
pkt packet
grow_by number of bytes by which to increase the size of the packet

Definition at line 75 of file avpacket.c.

void av_init_packet ( AVPacket pkt  ) 
int av_new_packet ( AVPacket pkt,
int  size 
)

Allocate the payload of a packet and initialize its fields with default values.

Parameters:
pkt packet
size wanted payload size
Returns:
0 if OK, AVERROR_xxx otherwise

Definition at line 49 of file avpacket.c.

Referenced by a64_write_packet(), aac_parse_packet(), amr_handle_packet(), amr_read_packet(), ape_read_packet(), audio_read_packet(), av_grow_packet(), avisynth_read_packet(), avs_read_video_packet(), callback(), cin_read_packet(), decode_frame(), dxa_read_packet(), fbdev_read_packet(), ff_asf_parse_packet(), ff_interleave_new_audio_packet(), ff_raw_read_partial_packet(), ff_rm_retrieve_cache(), ffm_read_packet(), film_read_packet(), flic_read_packet(), fourxm_read_packet(), grab_read_packet(), h263_handle_packet(), h264_handle_packet(), iff_read_packet(), ingenient_read_packet(), latm_parse_packet(), load_ipmovie_packet(), lxf_read_packet(), matroska_parse_block(), microdvd_read_packet(), mmf_read_packet(), mpc_read_packet(), mpegts_raw_read_packet(), nut_read_packet(), nuv_packet(), ogg_read_packet(), qdm2_restore_block(), qt_rtp_parse_packet(), read_frame(), read_packet(), return_stored_frame(), rm_assemble_video_frame(), rm_read_audio_stream_info(), roq_read_packet(), rtp_parse_packet_internal(), seq_read_packet(), siff_read_packet(), smacker_read_packet(), spdif_read_packet(), srt_read_packet(), store_packet(), str_read_packet(), supply_new_packets(), swf_read_packet(), v4l2_read_packet(), videostream_cb(), vmd_read_packet(), vqf_read_packet(), wsvqa_read_packet(), wv_read_packet(), xiph_handle_packet(), and yop_read_packet().

void av_shrink_packet ( AVPacket pkt,
int  size 
)

Reduce packet size, correctly zeroing padding.

Parameters:
pkt packet
size new size

Definition at line 68 of file avpacket.c.

Referenced by cin_read_packet(), ff_asf_parse_packet(), mxf_decrypt_triplet(), mxf_get_d10_aes3_packet(), nuv_packet(), and yop_read_packet().