mirror of https://github.com/mpv-player/mpv
vo_gpu_next: invalidate cache object if requested by libplacebo
See: https://code.videolan.org/videolan/libplacebo/-/merge_requests/659
This commit is contained in:
parent
dc632e16d2
commit
2f8038c598
|
@ -1636,9 +1636,6 @@ done:
|
|||
|
||||
static void cache_save_obj(void *p, pl_cache_obj obj)
|
||||
{
|
||||
if (!obj.data || !obj.size)
|
||||
return;
|
||||
|
||||
const struct cache *c = p;
|
||||
void *ta_ctx = talloc_new(NULL);
|
||||
|
||||
|
@ -1649,6 +1646,11 @@ static void cache_save_obj(void *p, pl_cache_obj obj)
|
|||
if (!filepath)
|
||||
goto done;
|
||||
|
||||
if (!obj.data || !obj.size) {
|
||||
unlink(filepath);
|
||||
goto done;
|
||||
}
|
||||
|
||||
// Don't save if already exists
|
||||
if (!stat(filepath, &(struct stat){0})) {
|
||||
MP_DBG(c, "%s: key(%"PRIx64"), size(%zu)\n", __func__, obj.key, obj.size);
|
||||
|
|
Loading…
Reference in New Issue