avutil/audio_fifo: Constify some pointees

Also constify AVAudioFifo* in the peek functions
besides constifying intermediate pointers (void**->void * const *).

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
Andreas Rheinhardt 2023-09-06 22:47:24 +02:00
parent 9bf31f6096
commit fa4bf5793a
4 changed files with 15 additions and 9 deletions

View File

@ -2,6 +2,10 @@ The last version increases of all libraries were on 2023-02-09
API changes, most recent first:
2023-09-07 - xxxxxxxxxx - lavu 58.22.100 - audio_fifo.h
Constify some pointees in av_audio_fifo_write(), av_audio_fifo_read(),
av_audio_fifo_peek() and av_audio_fifo_peek_at().
2023-09-07 - xxxxxxxxxx - lavu 58.21.100 - samplefmt.h
Constify some pointees in av_samples_copy() and av_samples_set_silence().

View File

@ -116,7 +116,7 @@ int av_audio_fifo_realloc(AVAudioFifo *af, int nb_samples)
return 0;
}
int av_audio_fifo_write(AVAudioFifo *af, void **data, int nb_samples)
int av_audio_fifo_write(AVAudioFifo *af, void * const *data, int nb_samples)
{
int i, ret, size;
@ -142,12 +142,13 @@ int av_audio_fifo_write(AVAudioFifo *af, void **data, int nb_samples)
return nb_samples;
}
int av_audio_fifo_peek(AVAudioFifo *af, void **data, int nb_samples)
int av_audio_fifo_peek(const AVAudioFifo *af, void * const *data, int nb_samples)
{
return av_audio_fifo_peek_at(af, data, nb_samples, 0);
}
int av_audio_fifo_peek_at(AVAudioFifo *af, void **data, int nb_samples, int offset)
int av_audio_fifo_peek_at(const AVAudioFifo *af, void * const *data,
int nb_samples, int offset)
{
int i, ret, size;
@ -171,7 +172,7 @@ int av_audio_fifo_peek_at(AVAudioFifo *af, void **data, int nb_samples, int offs
return nb_samples;
}
int av_audio_fifo_read(AVAudioFifo *af, void **data, int nb_samples)
int av_audio_fifo_read(AVAudioFifo *af, void * const *data, int nb_samples)
{
int i, size;

View File

@ -91,7 +91,7 @@ int av_audio_fifo_realloc(AVAudioFifo *af, int nb_samples);
* code on failure. If successful, the number of samples
* actually written will always be nb_samples.
*/
int av_audio_fifo_write(AVAudioFifo *af, void **data, int nb_samples);
int av_audio_fifo_write(AVAudioFifo *af, void * const *data, int nb_samples);
/**
* Peek data from an AVAudioFifo.
@ -107,7 +107,7 @@ int av_audio_fifo_write(AVAudioFifo *af, void **data, int nb_samples);
* be greater than nb_samples, and will only be less than
* nb_samples if av_audio_fifo_size is less than nb_samples.
*/
int av_audio_fifo_peek(AVAudioFifo *af, void **data, int nb_samples);
int av_audio_fifo_peek(const AVAudioFifo *af, void * const *data, int nb_samples);
/**
* Peek data from an AVAudioFifo.
@ -124,7 +124,8 @@ int av_audio_fifo_peek(AVAudioFifo *af, void **data, int nb_samples);
* be greater than nb_samples, and will only be less than
* nb_samples if av_audio_fifo_size is less than nb_samples.
*/
int av_audio_fifo_peek_at(AVAudioFifo *af, void **data, int nb_samples, int offset);
int av_audio_fifo_peek_at(const AVAudioFifo *af, void * const *data,
int nb_samples, int offset);
/**
* Read data from an AVAudioFifo.
@ -140,7 +141,7 @@ int av_audio_fifo_peek_at(AVAudioFifo *af, void **data, int nb_samples, int offs
* be greater than nb_samples, and will only be less than
* nb_samples if av_audio_fifo_size is less than nb_samples.
*/
int av_audio_fifo_read(AVAudioFifo *af, void **data, int nb_samples);
int av_audio_fifo_read(AVAudioFifo *af, void * const *data, int nb_samples);
/**
* Drain data from an AVAudioFifo.

View File

@ -79,7 +79,7 @@
*/
#define LIBAVUTIL_VERSION_MAJOR 58
#define LIBAVUTIL_VERSION_MINOR 21
#define LIBAVUTIL_VERSION_MINOR 22
#define LIBAVUTIL_VERSION_MICRO 100
#define LIBAVUTIL_VERSION_INT AV_VERSION_INT(LIBAVUTIL_VERSION_MAJOR, \