From cfe01a80aaaa481802f2f4488d5cea11166d76fb Mon Sep 17 00:00:00 2001 From: Martin Piatka Date: Thu, 9 Dec 2021 13:57:09 +0100 Subject: [PATCH] lavd: don't convert pixfmt if codec is constant size Constant size formats usually just contain pointers and cannot be split into parts. --- src/video_decompress/libavcodec.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/video_decompress/libavcodec.c b/src/video_decompress/libavcodec.c index c695921bf..1c09fc182 100644 --- a/src/video_decompress/libavcodec.c +++ b/src/video_decompress/libavcodec.c @@ -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; }