| FFmpeg
    | 
#include <string.h>#include "libavutil/avassert.h"#include "libavutil/common.h"#include "libavutil/mem.h"#include "avcodec.h"#include "bytestream.h"#include "internal.h"
Include dependency graph for avpacket.c:

Go to the source code of this file.
| Macros | |
| #define | ALLOC_MALLOC(data, size) data = av_malloc(size) | 
| #define | ALLOC_BUF(data, size) | 
| #define | DUP_DATA(dst, src, size, padding, ALLOC) | 
| #define | FF_MERGE_MARKER 0x8c4d9d108e25e9feULL | 
| Functions | |
| void | ff_packet_free_side_data (AVPacket *pkt) | 
| Remove and free all side data from packet.  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_packet_from_data (AVPacket *pkt, uint8_t *data, int size) | 
| Initialize a reference-counted packet from av_malloc()ed data.  More... | |
| static int | copy_packet_data (AVPacket *pkt, AVPacket *src) | 
| int | av_dup_packet (AVPacket *pkt) | 
| int | av_copy_packet (AVPacket *dst, AVPacket *src) | 
| Copy packet, including contents.  More... | |
| void | av_free_packet (AVPacket *pkt) | 
| Free a packet.  More... | |
| uint8_t * | av_packet_new_side_data (AVPacket *pkt, enum AVPacketSideDataType type, int size) | 
| Allocate new information of a packet.  More... | |
| uint8_t * | av_packet_get_side_data (AVPacket *pkt, enum AVPacketSideDataType type, int *size) | 
| Get side information from packet.  More... | |
| int | av_packet_merge_side_data (AVPacket *pkt) | 
| int | av_packet_split_side_data (AVPacket *pkt) | 
| int | av_packet_shrink_side_data (AVPacket *pkt, enum AVPacketSideDataType type, int size) | 
| Shrink the already allocated side data buffer.  More... | |
Macro Definition Documentation
Value:
do {                                         \
} while (0)
AVBufferRef * buf
A reference to the reference-counted buffer where the packet data is stored. 
Definition: libavcodec/avcodec.h:1034
int av_buffer_realloc(AVBufferRef **pbuf, int size)
Reallocate a given buffer. 
Definition: libavutil/buffer.c:156
Definition at line 156 of file avpacket.c.
Referenced by copy_packet_data().
Definition at line 155 of file avpacket.c.
Referenced by copy_packet_data().
Value:
do {                                                                \
                goto failed_alloc;                                      \
            ALLOC(data, size + FF_INPUT_BUFFER_PADDING_SIZE);           \
        } else {                                                        \
            ALLOC(data, size);                                          \
        }                                                               \
        if (!data)                                                      \
            goto failed_alloc;                                          \
        if (padding)                                                    \
    } while (0)
initialize output if(nPeaks >3)%at least 3 peaks in spectrum for trying to find f0 nf0peaks
#define FF_INPUT_BUFFER_PADDING_SIZE
Required number of additionally allocated bytes at the end of the input bitstream for decoding...
Definition: libavcodec/avcodec.h:561
Definition at line 162 of file avpacket.c.
Referenced by copy_packet_data().
| #define FF_MERGE_MARKER 0x8c4d9d108e25e9feULL | 
Definition at line 304 of file avpacket.c.
Referenced by av_packet_merge_side_data(), and av_packet_split_side_data().
Function Documentation
Definition at line 183 of file avpacket.c.
Referenced by av_copy_packet(), and av_dup_packet().
Remove and free all side data from packet.
Definition at line 31 of file avpacket.c.
Referenced by avcodec_decode_audio4(), avcodec_decode_subtitle2(), avcodec_decode_video2(), and avcodec_encode_audio().
Generated on Fri Oct 31 2025 06:56:19 for FFmpeg by
 1.8.11
 1.8.11