Opened 4 weeks ago

Closed 13 days ago

#7505 closed defect (fixed)

Coding Error in decklink_dec.cpp

Reported by: dbigler Owned by:
Priority: normal Component: avdevice
Version: git-master Keywords: decklink
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

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().

Change History (2)

comment:1 Changed 4 weeks ago by cehoyos

  • Priority changed from important to normal

Please send your patch made with git format-patch to the FFmpeg development mailing list, patches and patch suggestions are ignored here.

comment:2 Changed 13 days ago by cus

  • Resolution set to fixed
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.