Skip to content

Commit

Permalink
dav1d: fix tautology
Browse files Browse the repository at this point in the history
Fixes "warning: comparison is always false due to limited range of data type" as hbd will never be 0.
  • Loading branch information
tmatth committed Oct 23, 2024
1 parent d87c968 commit f1a9039
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions modules/codec/dav1d.c
Original file line number Diff line number Diff line change
Expand Up @@ -115,14 +115,14 @@ static vlc_fourcc_t FindVlcChroma(const Dav1dPicture *img)
img->seq_hdr->pri == DAV1D_COLOR_PRI_BT709 &&
img->seq_hdr->trc == DAV1D_TRC_SRGB )
{
if( img->seq_hdr->hbd < 0 || img->seq_hdr->hbd >= (int)ARRAY_SIZE(chroma_table_rgb) )
if( img->seq_hdr->hbd >= (int)ARRAY_SIZE(chroma_table_rgb) )
return 0;
return chroma_table_rgb[img->seq_hdr->hbd];
}

if( img->seq_hdr->layout < 0 || img->seq_hdr->layout >= (int)ARRAY_SIZE(chroma_table) )
return 0;
if( img->seq_hdr->hbd < 0 || img->seq_hdr->hbd >= (int)ARRAY_SIZE(chroma_table[0]) )
if( img->seq_hdr->hbd >= (int)ARRAY_SIZE(chroma_table[0]) )
return 0;

return chroma_table[img->seq_hdr->layout][img->seq_hdr->hbd];
Expand Down

0 comments on commit f1a9039

Please sign in to comment.