Opened 6 years ago
Closed 6 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 , 6 years ago
Priority: | important → normal |
---|
comment:2 by , 6 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Fixed in cb74c33106d08b09ff0a2e395fe0b69828031d63.
Please send your patch made with
git format-patch
to the FFmpeg development mailing list, patches and patch suggestions are ignored here.