mirror of
https://github.com/nyanmisaka/ffmpeg-rockchip.git
synced 2025-12-24 11:52:06 +08:00
avcodec.h, avpacket.c: use const AVPacket pointers in copy functions
Signed-off-by: Roman Fietze <roman.fietze@telemotive.de> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
committed by
Michael Niedermayer
parent
0cc685e3ad
commit
5bb3f88255
@@ -190,7 +190,7 @@ do { \
|
||||
} while (0)
|
||||
|
||||
/* 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->side_data = NULL;
|
||||
@@ -220,7 +220,7 @@ failed_alloc:
|
||||
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) {
|
||||
int i;
|
||||
@@ -262,7 +262,7 @@ FF_ENABLE_DEPRECATION_WARNINGS
|
||||
return 0;
|
||||
}
|
||||
|
||||
int av_copy_packet(AVPacket *dst, AVPacket *src)
|
||||
int av_copy_packet(AVPacket *dst, const AVPacket *src)
|
||||
{
|
||||
*dst = *src;
|
||||
return copy_packet_data(dst, src, 0);
|
||||
@@ -534,7 +534,7 @@ void av_packet_unref(AVPacket *pkt)
|
||||
pkt->size = 0;
|
||||
}
|
||||
|
||||
int av_packet_ref(AVPacket *dst, AVPacket *src)
|
||||
int av_packet_ref(AVPacket *dst, const AVPacket *src)
|
||||
{
|
||||
int ret;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user