[FFmpeg-trac] #6754(avfilter:new): libavfilter/signature_lookup.c:494: suspicious compare ?

FFmpeg trac at avcodec.org
Tue Oct 17 12:47:35 EEST 2017


#6754: libavfilter/signature_lookup.c:494: suspicious compare ?
----------------------------------+---------------------------------------
             Reporter:  dcb       |                     Type:  defect
               Status:  new       |                 Priority:  normal
            Component:  avfilter  |                  Version:  unspecified
             Keywords:            |               Blocked By:
             Blocking:            |  Reproduced by developer:  0
Analyzed by developer:  0         |
----------------------------------+---------------------------------------
 ffmpeg-3.4/libavfilter/signature_lookup.c:494]: (warning) Result of
 operator '|' is always true if one operand is non-zero. Did you intend to
 use '&'?

 Source code is

         if (meandist < minmeandist ||
                 status == STATUS_END_REACHED | STATUS_BEGIN_REACHED ||
                 mode == MODE_FAST){

 maybe better code

         if (meandist < minmeandist ||
                 status == (STATUS_END_REACHED | STATUS_BEGIN_REACHED) ||
                 mode == MODE_FAST){

--
Ticket URL: <https://trac.ffmpeg.org/ticket/6754>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list