]> git.sesse.net Git - ffmpeg/commit
fftools/ffplay: do not write out of rdft visualization texture
authorMarton Balint <cus@passwd.hu>
Wed, 3 Mar 2021 22:23:10 +0000 (23:23 +0100)
committerMarton Balint <cus@passwd.hu>
Wed, 10 Mar 2021 19:01:03 +0000 (20:01 +0100)
commit573f05a7533cd9aed3ed895b4fa4ad8fcba4e56a
tree1b419c00e630d89e937788ece4fd6f76f0e314cf
parenta7425f712aeed6e18204a68810529895fdbdb1be
fftools/ffplay: do not write out of rdft visualization texture

If the window is resized it was possible that xpos pointed outside the
visualization texture. By rearranging the overflow check we make sure this (and
a crash) does not happen.

We also don't have to use xleft for start position, as that is 0 anyways, and
if we ever want to take into account xleft then the texture should be
positioned accordingly when rendering.

Signed-off-by: Marton Balint <cus@passwd.hu>
fftools/ffplay.c