Browse Source

Add av_copy_packet()

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
tags/n1.0
Andrey Utkin Michael Niedermayer 13 years ago
parent
commit
cc07a7925e
3 changed files with 14 additions and 1 deletions
  1. +7
    -0
      libavcodec/avcodec.h
  2. +6
    -0
      libavcodec/avpacket.c
  3. +1
    -1
      libavcodec/version.h

+ 7
- 0
libavcodec/avcodec.h View File

@@ -3668,6 +3668,13 @@ int av_grow_packet(AVPacket *pkt, int grow_by);
*/
int av_dup_packet(AVPacket *pkt);

/**
* Copy packet, including contents
*
* @return 0 on success, negative AVERROR on fail
*/
int av_copy_packet(AVPacket *dst, AVPacket *src);

/**
* Free a packet.
*


+ 6
- 0
libavcodec/avpacket.c View File

@@ -165,6 +165,12 @@ int av_dup_packet(AVPacket *pkt)
return 0;
}

int av_copy_packet(AVPacket *dst, AVPacket *src)
{
*dst = *src;
return copy_packet_data(dst, src);
}

void av_free_packet(AVPacket *pkt)
{
if (pkt) {


+ 1
- 1
libavcodec/version.h View File

@@ -27,7 +27,7 @@
*/

#define LIBAVCODEC_VERSION_MAJOR 54
#define LIBAVCODEC_VERSION_MINOR 56
#define LIBAVCODEC_VERSION_MINOR 57
#define LIBAVCODEC_VERSION_MICRO 100

#define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \


Loading…
Cancel
Save