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 c274f90fa8
commit 39797095bd

View File

@@ -99,7 +99,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;