#6751: libavformat/mpegtsenc.c:1646: bad if statement ?
-------------------------------------+------------------------------------
             Reporter:  dcb          |                    Owner:
                 Type:  defect       |                   Status:  reopened
             Priority:  normal       |                Component:  avformat
              Version:  unspecified  |               Resolution:
             Keywords:               |               Blocked By:
             Blocking:               |  Reproduced by developer:  0
Analyzed by developer:  0            |
-------------------------------------+------------------------------------
Changes (by cehoyos):

 * status:  closed => reopened
 * resolution:  duplicate =>


Old description:

> ffmpeg-3.4/libavformat/mpegtsenc.c:1646]: (warning) Logical conjunction
> always evaluates to false: EXPR < 32 && EXPR >= 48.
>
> Source code is
>
>        if ((state & 0x7e) < 2*16 && (state & 0x7e) >= 2*24)
>
> maybe better code
>
>        if ((state & 0x7e) < 2*16 || (state & 0x7e) >= 2*24)

New description:

 ffmpeg-3.4/libavformat/mpegtsenc.c:1646]: (warning) Logical conjunction
 always evaluates to false: EXPR < 32 && EXPR >= 48.

 Source code is
 {{{
        if ((state & 0x7e) < 2*16 && (state & 0x7e) >= 2*24)
 }}}
 maybe better code
 {{{
        if ((state & 0x7e) < 2*16 || (state & 0x7e) >= 2*24)
 }}}

--

--
Ticket URL: <https://trac.ffmpeg.org/ticket/6751#comment:2>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker
_______________________________________________
FFmpeg-trac mailing list
[email protected]
https://ffmpeg.org/mailman/listinfo/ffmpeg-trac

To unsubscribe, visit link above, or email
[email protected] with subject "unsubscribe".

Reply via email to