Fixes CID703717 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Showing the changes to libavfilter (1 of 1 file). Show all
Unified · Split
| @@ -188,6 +188,10 @@ void copy_picture_field(uint8_t *dst[4], int dst_linesize[4], · 187 unmodified lines | ||
| 188 | 188 | int linesize = av_image_get_linesize(format, w, plane); |
| 189 | 189 | uint8_t *dstp = dst[plane]; |
| 190 | 190 | const uint8_t *srcp = src[plane]; |
| 191 | + | |
| 192 | + if (linesize < 0) | |
| 193 | + return; | |
| 194 | + | |
| 191 | 195 | lines /= k; |
| 192 | 196 | if (src_field == FIELD_LOWER) |
| 193 | 197 | srcp += src_linesize[plane]; |