[FFmpeg-trac] #7505(avdevice:new): Coding Error in decklink_dec.cpp

FFmpeg trac at avcodec.org
Fri Oct 19 22:51:14 EEST 2018


#7505: Coding Error in decklink_dec.cpp
----------------------------------+--------------------------------------
             Reporter:  dbigler   |                     Type:  defect
               Status:  new       |                 Priority:  important
            Component:  avdevice  |                  Version:  git-master
             Keywords:  decklink  |               Blocked By:
             Blocking:            |  Reproduced by developer:  0
Analyzed by developer:  0         |
----------------------------------+--------------------------------------
 Summary of the bug:

 Just located a coding error in decklink_dec.cpp

 lines 1170 and 1171 should be swapped:
 st->codecpar->codec_tag   = avcodec_pix_fmt_to_codec_tag((enum
 AVPixelFormat)st->codecpar->format);
 st->codecpar->format      = AV_PIX_FMT_0RGB;

 as:
 st->codecpar->format      = AV_PIX_FMT_0RGB;
 st->codecpar->codec_tag   = avcodec_pix_fmt_to_codec_tag((enum
 AVPixelFormat)st->codecpar->format);

 lines 1176 and 1177 should also be swapped:
 st->codecpar->codec_tag   = avcodec_pix_fmt_to_codec_tag((enum
 AVPixelFormat)st->codecpar->format);
 st->codecpar->format      = AV_PIX_FMT_BGR0;

 as:
 st->codecpar->format      = AV_PIX_FMT_BGR0;
 st->codecpar->codec_tag   = avcodec_pix_fmt_to_codec_tag((enum
 AVPixelFormat)st->codecpar->format);

 Otherwise the value set in format will have no effect in the call to
 avcodec_pix_fmt_to_codec_tag().

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


More information about the FFmpeg-trac mailing list