use linesize workaround for setting OIIO pixels as well as getting

This commit is contained in:
itsmattkc
2020-05-02 22:51:29 +10:00
parent 90597bd08a
commit 3e57cdac1d
3 changed files with 34 additions and 7 deletions
+1 -5
View File
@@ -230,11 +230,7 @@ FramePtr PixelFormat::ConvertPixelFormat(FramePtr frame, const PixelFormat::Form
// Set the pixels (this is necessary as opposed to an OIIO buffer wrapper since Frame has
// linesizes)
src.set_pixels(OIIO::ROI(),
GetOIIOTypeDesc(frame->format()),
frame->const_data(),
OIIO::AutoStride,
frame->linesize_bytes());
OIIODecoder::FrameToBuffer(frame, &src);
// Create a destination OIIO buffer with our destination format
OIIO::ImageBuf dst(OIIO::ImageSpec(converted->width(),