diff options
author | Anton Khirnov <anton@khirnov.net> | 2023-04-26 10:05:26 +0200 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2023-05-02 10:59:24 +0200 |
commit | 3190bed148df57740ef818764979d60dde53d3d0 (patch) | |
tree | 7997ecb106624200be4dc5c68a468d23fb881f67 /fftools | |
parent | 302aecd06a07ee4eac7486167992fa18f0447232 (diff) | |
download | ffmpeg-3190bed148df57740ef818764979d60dde53d3d0.tar.gz |
fftools/ffmpeg: constify packets passed to decode*()
They are not modified by these functions.
Diffstat (limited to 'fftools')
-rw-r--r-- | fftools/ffmpeg.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/fftools/ffmpeg.c b/fftools/ffmpeg.c index e766301535..bb8c6bf00c 100644 --- a/fftools/ffmpeg.c +++ b/fftools/ffmpeg.c @@ -822,7 +822,7 @@ int ifilter_has_all_input_formats(FilterGraph *fg) // it again with pkt=NULL. pkt==NULL is treated differently from pkt->size==0 // (pkt==NULL means get more output, pkt->size==0 is a flush/drain packet) static int decode(InputStream *ist, AVCodecContext *avctx, - AVFrame *frame, int *got_frame, AVPacket *pkt) + AVFrame *frame, int *got_frame, const AVPacket *pkt) { int ret; @@ -960,7 +960,7 @@ static void audio_ts_process(InputStream *ist, AVFrame *frame) frame->time_base = tb_filter; } -static int decode_audio(InputStream *ist, AVPacket *pkt, int *got_output, +static int decode_audio(InputStream *ist, const AVPacket *pkt, int *got_output, int *decode_failed) { AVFrame *decoded_frame = ist->decoded_frame; @@ -1048,8 +1048,8 @@ static int64_t video_duration_estimate(const InputStream *ist, const AVFrame *fr return FFMAX(ist->last_frame_duration_est, 1); } -static int decode_video(InputStream *ist, AVPacket *pkt, int *got_output, int64_t *duration_pts, int eof, - int *decode_failed) +static int decode_video(InputStream *ist, const AVPacket *pkt, int *got_output, + int64_t *duration_pts, int eof, int *decode_failed) { AVFrame *decoded_frame = ist->decoded_frame; int ret = 0, err = 0; |