Skip to content

Commit

Permalink
utils/libav: properly initialize row_stride
Browse files Browse the repository at this point in the history
Prevents UB on pl_plane_find_fmt() when comparing the row stride against
the texel alignment.

cf. #111
  • Loading branch information
haasn committed Nov 19, 2021
1 parent 9f0c143 commit 89b11e2
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/include/libplacebo/utils/libav_internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -366,6 +366,7 @@ static inline bool pl_test_pixfmt(pl_gpu gpu,
return false;

for (int i = 0; i < planes; i++) {
data[i].row_stride = 0;
if (!pl_plane_find_fmt(gpu, NULL, &data[i]))
return false;
}
Expand Down

0 comments on commit 89b11e2

Please sign in to comment.