avformat/mux: Use const AVPacket * in compare functions

There is no reason for these functions to modify the given packets at
all.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
Andreas Rheinhardt
2019-08-13 04:47:16 +02:00
committed by Michael Niedermayer
parent e301736862
commit 1147759552
6 changed files with 11 additions and 9 deletions

View File

@@ -917,7 +917,7 @@ int av_write_frame(AVFormatContext *s, AVPacket *pkt)
#define CHUNK_START 0x1000
int ff_interleave_add_packet(AVFormatContext *s, AVPacket *pkt,
int (*compare)(AVFormatContext *, AVPacket *, AVPacket *))
int (*compare)(AVFormatContext *, const AVPacket *, const AVPacket *))
{
int ret;
AVPacketList **next_point, *this_pktl;
@@ -994,8 +994,8 @@ next_non_null:
return 0;
}
static int interleave_compare_dts(AVFormatContext *s, AVPacket *next,
AVPacket *pkt)
static int interleave_compare_dts(AVFormatContext *s, const AVPacket *next,
const AVPacket *pkt)
{
AVStream *st = s->streams[pkt->stream_index];
AVStream *st2 = s->streams[next->stream_index];