}
if (st->codec->pix_fmt != AV_PIX_FMT_NONE && st->codec->pix_fmt != pix_fmt) {
av_log(s, AV_LOG_ERROR, "pixel format change unsupported\n");
- res = AVERROR_PATCHWELCOME;
- goto bitmap_end;
- }
- st->codec->pix_fmt = pix_fmt;
+ } else
+ st->codec->pix_fmt = pix_fmt;
if (linesize * height > pkt->size) {
res = AVERROR_INVALIDDATA;