Commit cc07a792 authored by Andrey Utkin's avatar Andrey Utkin Committed by Michael Niedermayer

Add av_copy_packet()

Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent d33908a5
...@@ -3668,6 +3668,13 @@ int av_grow_packet(AVPacket *pkt, int grow_by); ...@@ -3668,6 +3668,13 @@ int av_grow_packet(AVPacket *pkt, int grow_by);
*/ */
int av_dup_packet(AVPacket *pkt); 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. * Free a packet.
* *
......
...@@ -165,6 +165,12 @@ int av_dup_packet(AVPacket *pkt) ...@@ -165,6 +165,12 @@ int av_dup_packet(AVPacket *pkt)
return 0; return 0;
} }
int av_copy_packet(AVPacket *dst, AVPacket *src)
{
*dst = *src;
return copy_packet_data(dst, src);
}
void av_free_packet(AVPacket *pkt) void av_free_packet(AVPacket *pkt)
{ {
if (pkt) { if (pkt) {
......
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
*/ */
#define LIBAVCODEC_VERSION_MAJOR 54 #define LIBAVCODEC_VERSION_MAJOR 54
#define LIBAVCODEC_VERSION_MINOR 56 #define LIBAVCODEC_VERSION_MINOR 57
#define LIBAVCODEC_VERSION_MICRO 100 #define LIBAVCODEC_VERSION_MICRO 100
#define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \ #define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment