[FFmpeg-devel] [PATCH] avutil/tests: Replacement selftest for audio_fifo.c
Michael Niedermayer
michael at niedermayer.cc
Tue Dec 27 18:23:00 EET 2016
On Mon, Dec 26, 2016 at 06:21:18PM -0800, Thomas Turner wrote:
> Signed-off-by: Thomas Turner <thomastdt at googlemail.com>
> ---
> libavutil/tests/audio_fifo.c | 181 ++++++++++++++++++++++++++++---------------
> tests/ref/fate/audio_fifo | 34 +++-----
> 2 files changed, 130 insertions(+), 85 deletions(-)
The commit message is a bit terse, please describe what/why things
are changed
[...]
> +static void ERROR(const char *str, AVAudioFifo *afifo, Audio_Data *adata)
> {
> - int p, b, f;
> - int byte_offset = av_get_bytes_per_sample(test_sample->format);
> - int buffers = av_sample_fmt_is_planar(test_sample->format)
> - ? test_sample->nb_ch : 1;
> - int line_size = (buffers > 1) ? nb_samples * byte_offset
> - : nb_samples * byte_offset * test_sample->nb_ch;
> - for (p = 0; p < buffers; ++p){
> - for(b = 0; b < line_size; b+=byte_offset){
> - for (f = 0; f < byte_offset; f++){
> - int order = !HAVE_BIGENDIAN ? (byte_offset - f - 1) : f;
> - printf("%02x", *((uint8_t*)data_planes[p] + b + order));
> + fprintf(stderr, "%s\n", str);
> +
> + if (afifo)
> + av_audio_fifo_free(afifo);
> + if (adata)
> + free_audio(adata);
> +
> + exit(1);
> +}
the indention depth seems inconsistent compared to the other functions
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
When you are offended at any man's fault, turn to yourself and study your
own failings. Then you will forget your anger. -- Epictetus
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20161227/ae3e0bc9/attachment.sig>
More information about the ffmpeg-devel
mailing list