Skip to content

Commit

Permalink
Fix precedence of operations in mythmpeg2.
Browse files Browse the repository at this point in the history
The latest clang19 ARM compiler is pointing out that an "and"
operation has lower precedence than an "equality" operation.  Add
parentheses to ensure this expression is parsed properly.

This was introduced in 4427b93.
  • Loading branch information
linuxdude42 committed Aug 13, 2024
1 parent 274ea4b commit c166b74
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions mythtv/libs/libmythmpeg2/header.c
Original file line number Diff line number Diff line change
Expand Up @@ -625,9 +625,9 @@ static int picture_coding_ext (mpeg2dec_t * mpeg2dec)
picture->nb_fields = (buffer[3] & 2) ? 3 : 2;
flags |= (buffer[3] & 128) ? PIC_FLAG_TOP_FIELD_FIRST : 0;
} else {
if (buffer[3]&2 == 0)
if ((buffer[3]&2) == 0)
picture->nb_fields = 2;
else if (buffer[3]&128 == 0)
else if ((buffer[3]&128) == 0)
picture->nb_fields = 4;
else
picture->nb_fields = 6;
Expand Down

0 comments on commit c166b74

Please sign in to comment.