Opened 5 years ago

Closed 5 years 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 by Carl Eugen Hoyos, 5 years ago

Priority: importantnormal

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

comment:2 by Marton Balint, 5 years ago

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.