change_pixfmt: added buffer padding

Pixelformat conversion suppose buffers with additional padding to handle
"odd" resolutions that doesn't match the pixfmt native block
size. Eg. this change fixes:
```
uv -t testcard:codec=R12L:size=1922x1080 -d gl -p change_pixfmt:RG48
```
This commit is contained in:
Martin Pulec
2024-08-30 10:59:51 +02:00
parent 3adb9a46cc
commit 671b188013

View File

@@ -107,7 +107,7 @@ static struct video_frame *filter(void *state, struct video_frame *in)
if (s->vo_pp_out_buffer) {
out->tiles[0].data = s->vo_pp_out_buffer;
} else {
out->tiles[0].data = malloc(out->tiles[0].data_len);
out->tiles[0].data = malloc(out->tiles[0].data_len + MAX_PADDING);
out->callbacks.data_deleter = vf_data_deleter;
}
out->callbacks.dispose = vf_free;