Commit 5bb3f882 authored by Roman Fietze's avatar Roman Fietze Committed by Michael Niedermayer

avcodec.h, avpacket.c: use const AVPacket pointers in copy functions

Signed-off-by: 's avatarRoman Fietze <roman.fietze@telemotive.de>
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 0cc685e3
...@@ -3602,14 +3602,14 @@ int av_dup_packet(AVPacket *pkt); ...@@ -3602,14 +3602,14 @@ int av_dup_packet(AVPacket *pkt);
* *
* @return 0 on success, negative AVERROR on fail * @return 0 on success, negative AVERROR on fail
*/ */
int av_copy_packet(AVPacket *dst, AVPacket *src); int av_copy_packet(AVPacket *dst, const AVPacket *src);
/** /**
* Copy packet side data * Copy packet side data
* *
* @return 0 on success, negative AVERROR on fail * @return 0 on success, negative AVERROR on fail
*/ */
int av_copy_packet_side_data(AVPacket *dst, AVPacket *src); int av_copy_packet_side_data(AVPacket *dst, const AVPacket *src);
/** /**
* Free a packet. * Free a packet.
...@@ -3698,7 +3698,7 @@ void av_packet_free_side_data(AVPacket *pkt); ...@@ -3698,7 +3698,7 @@ void av_packet_free_side_data(AVPacket *pkt);
* *
* @return 0 on success, a negative AVERROR on error. * @return 0 on success, a negative AVERROR on error.
*/ */
int av_packet_ref(AVPacket *dst, AVPacket *src); int av_packet_ref(AVPacket *dst, const AVPacket *src);
/** /**
* Wipe the packet. * Wipe the packet.
......
...@@ -190,7 +190,7 @@ do { \ ...@@ -190,7 +190,7 @@ do { \
} while (0) } while (0)
/* Makes duplicates of data, side_data, but does not copy any other fields */ /* Makes duplicates of data, side_data, but does not copy any other fields */
static int copy_packet_data(AVPacket *pkt, AVPacket *src, int dup) static int copy_packet_data(AVPacket *pkt, const AVPacket *src, int dup)
{ {
pkt->data = NULL; pkt->data = NULL;
pkt->side_data = NULL; pkt->side_data = NULL;
...@@ -220,7 +220,7 @@ failed_alloc: ...@@ -220,7 +220,7 @@ failed_alloc:
return AVERROR(ENOMEM); return AVERROR(ENOMEM);
} }
int av_copy_packet_side_data(AVPacket *pkt, AVPacket *src) int av_copy_packet_side_data(AVPacket *pkt, const AVPacket *src)
{ {
if (src->side_data_elems) { if (src->side_data_elems) {
int i; int i;
...@@ -262,7 +262,7 @@ FF_ENABLE_DEPRECATION_WARNINGS ...@@ -262,7 +262,7 @@ FF_ENABLE_DEPRECATION_WARNINGS
return 0; return 0;
} }
int av_copy_packet(AVPacket *dst, AVPacket *src) int av_copy_packet(AVPacket *dst, const AVPacket *src)
{ {
*dst = *src; *dst = *src;
return copy_packet_data(dst, src, 0); return copy_packet_data(dst, src, 0);
...@@ -534,7 +534,7 @@ void av_packet_unref(AVPacket *pkt) ...@@ -534,7 +534,7 @@ void av_packet_unref(AVPacket *pkt)
pkt->size = 0; pkt->size = 0;
} }
int av_packet_ref(AVPacket *dst, AVPacket *src) int av_packet_ref(AVPacket *dst, const AVPacket *src)
{ {
int ret; int ret;
......
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