[FFmpeg-trac] #6751(avformat:reopened): libavformat/mpegtsenc.c:1646: bad if statement ?
FFmpeg
trac at avcodec.org
Sun Nov 3 21:00:45 EET 2019
#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
More information about the FFmpeg-trac
mailing list