Commit 1cb57d3
committed
video_display: fix use ptr after free
video_display putf implementation may free the frame so that the pointer
is no longer valid upon the exit from the callback (or anytime later).
This is the case for eg. vdisp/decklink.
Fixes `uv -t testcard -c lavc -d dummy:discard` (wrong color in output
line):
```
[dummy] 126 frames in 5.03501 seconds = 25.0248 FPS
```
even though FPS is +/- the nominal 25. Depending on circumstances it
could have also easily crashed (access after free).1 parent 0349beb commit 1cb57d3
1 file changed
+2
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
351 | 351 | | |
352 | 352 | | |
353 | 353 | | |
| 354 | + | |
354 | 355 | | |
355 | 356 | | |
356 | 357 | | |
| |||
364 | 365 | | |
365 | 366 | | |
366 | 367 | | |
367 | | - | |
| 368 | + | |
368 | 369 | | |
369 | 370 | | |
370 | 371 | | |
| |||
0 commit comments