From: Carl Hetherington Date: Tue, 30 Mar 2021 10:14:18 +0000 (+0200) Subject: Add an assert for a function that can fail. X-Git-Tag: v2.15.138~20 X-Git-Url: https://git.carlh.net/gitweb/?p=dcpomatic.git;a=commitdiff_plain;h=c7573918f64657f720c7e9437df0a33e505c88bc Add an assert for a function that can fail. --- diff --git a/src/lib/ffmpeg_decoder.cc b/src/lib/ffmpeg_decoder.cc index c591ba30c..147bb384f 100644 --- a/src/lib/ffmpeg_decoder.cc +++ b/src/lib/ffmpeg_decoder.cc @@ -234,6 +234,7 @@ DCPOMATIC_DISABLE_WARNINGS 0, stream->stream(_format_context)->codec->channels, _frame->nb_samples, audio_sample_format (stream), 1 ); DCPOMATIC_ENABLE_WARNINGS + DCPOMATIC_ASSERT (size >= 0); /* XXX: can't we just use _frame->nb_samples directly here? */ /* XXX: can't we use swr_convert() to do the format conversion? */