lavd: don't convert pixfmt if codec is constant size

Constant size formats usually just contain pointers and cannot be split
into parts.
This commit is contained in:
Martin Piatka
2021-12-09 13:57:09 +01:00
parent c59aabc856
commit cfe01a80aa

View File

@@ -786,7 +786,10 @@ static int change_pixfmt(AVFrame *frame, unsigned char *dst, int av_codec, codec
}
if (convert) {
parallel_convert(convert, (char *) dst, frame, width, height, pitch, rgb_shift);
if(!codec_is_const_size(out_codec))
parallel_convert(convert, (char *) dst, frame, width, height, pitch, rgb_shift);
else
convert((char *) dst, frame, width, height, pitch, rgb_shift);
return TRUE;
}