mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-29 19:50:40 +00:00
cog: reset cache instead of returning NULL
Returning NULL makes things crash. Resetting the cache makes things run slow. Still an underlying bug somewhere, but not critical.
This commit is contained in:
parent
05a1e071b9
commit
3c870a7a6c
1 changed files with 8 additions and 2 deletions
|
@ -139,8 +139,14 @@ cog_virt_frame_get_line (CogFrame * frame, int component, int i)
|
|||
}
|
||||
|
||||
if (i < frame->cache_offset[component]) {
|
||||
g_warning ("cache failure");
|
||||
return NULL;
|
||||
g_warning ("cache failure: %d outside [%d,%d]", i,
|
||||
frame->cache_offset[component],
|
||||
frame->cache_offset[component] + COG_FRAME_CACHE_SIZE - 1);
|
||||
|
||||
frame->cache_offset[component] = i;
|
||||
for (j = 0; j < COG_FRAME_CACHE_SIZE; j++) {
|
||||
frame->cached_lines[component][j] = 0;
|
||||
}
|
||||
}
|
||||
|
||||
while (i >= frame->cache_offset[component] + COG_FRAME_CACHE_SIZE) {
|
||||
|
|
Loading…
Reference in a new issue