Browse Source

Export av_init_packet

Originally committed as revision 9211 to svn://svn.ffmpeg.org/ffmpeg/trunk
tags/v0.5
Ramiro Polla 18 years ago
parent
commit
659596f002
2 changed files with 12 additions and 10 deletions
  1. +1
    -10
      libavformat/avformat.h
  2. +11
    -0
      libavformat/utils.c

+ 1
- 10
libavformat/avformat.h View File

@@ -57,16 +57,7 @@ void av_destruct_packet_nofree(AVPacket *pkt);
void av_destruct_packet(AVPacket *pkt);

/* initialize optional fields of a packet */
static inline void av_init_packet(AVPacket *pkt)
{
pkt->pts = AV_NOPTS_VALUE;
pkt->dts = AV_NOPTS_VALUE;
pkt->pos = -1;
pkt->duration = 0;
pkt->flags = 0;
pkt->stream_index = 0;
pkt->destruct= av_destruct_packet_nofree;
}
void av_init_packet(AVPacket *pkt);

/**
* Allocate the payload of a packet and intialized its fields to default values.


+ 11
- 0
libavformat/utils.c View File

@@ -176,6 +176,17 @@ void av_destruct_packet(AVPacket *pkt)
pkt->data = NULL; pkt->size = 0;
}

void av_init_packet(AVPacket *pkt)
{
pkt->pts = AV_NOPTS_VALUE;
pkt->dts = AV_NOPTS_VALUE;
pkt->pos = -1;
pkt->duration = 0;
pkt->flags = 0;
pkt->stream_index = 0;
pkt->destruct= av_destruct_packet_nofree;
}

int av_new_packet(AVPacket *pkt, int size)
{
uint8_t *data;


Loading…
Cancel
Save