[FFmpeg-trac] #6752(avformat:new): ffmpeg-3.4/libavformat/hlsenc.c:210: bad if statement ?

FFmpeg trac at avcodec.org
Tue Oct 17 12:45:00 EEST 2017


#6752: ffmpeg-3.4/libavformat/hlsenc.c:210: bad if statement ?
----------------------------------+---------------------------------------
             Reporter:  dcb       |                     Type:  defect
               Status:  new       |                 Priority:  normal
            Component:  avformat  |                  Version:  unspecified
             Keywords:            |               Blocked By:
             Blocking:            |  Reproduced by developer:  0
Analyzed by developer:  0         |
----------------------------------+---------------------------------------
 ffmpeg-3.4/libavformat/hlsenc.c:210]: (warning) Logical disjunction always
 evaluates to true: EXPR != '/' || EXPR != '\\'.

 Source code is

     if ((*(pos - 1) != '/') || (*(pos - 1) != '\\')) {

 Maybe better code

     if ((*(pos - 1) != '/') && (*(pos - 1) != '\\')) {

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


More information about the FFmpeg-trac mailing list