Skip to content

Commit

Permalink
aout: use static assert for fallbacks
Browse files Browse the repository at this point in the history
  • Loading branch information
fcartegnie authored and robUx4 committed Oct 10, 2024
1 parent d22daeb commit ee76204
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/audio_output/output.c
Original file line number Diff line number Diff line change
Expand Up @@ -747,10 +747,10 @@ int aout_OutputNew(audio_output_t *aout, vlc_aout_stream *stream,
{
switch (fmt->i_format)
{
static_assert(ARRAY_SIZE(formats) >= 3, "fallback array too small");
case VLC_CODEC_DTS:
if (input_profile > 0)
{
assert(ARRAY_SIZE(formats) >= 3);
/* DTSHD can be played as DTSHD or as DTS */
formats[0] = VLC_CODEC_DTSHD;
formats[1] = VLC_CODEC_DTS;
Expand All @@ -759,7 +759,6 @@ int aout_OutputNew(audio_output_t *aout, vlc_aout_stream *stream,
case VLC_CODEC_A52:
if (input_profile > 0)
{
assert(ARRAY_SIZE(formats) >= 3);
formats[0] = VLC_CODEC_EAC3;
formats[1] = VLC_CODEC_A52;
}
Expand Down

0 comments on commit ee76204

Please sign in to comment.