If depth is 0, then the component is invalid/unset.
Unified · Split
| @@ -45,6 +45,9 @@ void av_read_image_line2(void *dst, · 44 unmodified lines | |||
| 45 | uint16_t *dst16 = dst; | 45 | uint16_t *dst16 = dst; |
| 46 | uint32_t *dst32 = dst; | 46 | uint32_t *dst32 = dst; |
| 47 | 47 | ||
| 48 | if (!depth) | ||
| 49 | return; | ||
| 50 | |||
| 48 | if (flags & AV_PIX_FMT_FLAG_BITSTREAM) { | 51 | if (flags & AV_PIX_FMT_FLAG_BITSTREAM) { |
| 49 | if (depth == 10) { | 52 | if (depth == 10) { |
| 50 | // Assume all channels are packed into a 32bit value | 53 | // Assume all channels are packed into a 32bit value |
| @@ -124,6 +127,9 @@ void av_write_image_line2(const void *src, · 73 unmodified lines | |||
| 124 | const uint32_t *src32 = src; | 127 | const uint32_t *src32 = src; |
| 125 | const uint16_t *src16 = src; | 128 | const uint16_t *src16 = src; |
| 126 | 129 | ||
| 130 | if (!depth) | ||
| 131 | return; | ||
| 132 | |||
| 127 | if (flags & AV_PIX_FMT_FLAG_BITSTREAM) { | 133 | if (flags & AV_PIX_FMT_FLAG_BITSTREAM) { |
| 128 | if (depth == 10) { | 134 | if (depth == 10) { |
| 129 | // Assume all channels are packed into a 32bit value | 135 | // Assume all channels are packed into a 32bit value |