vf_cuda_grid: overlay с invalid cell — silent skip вместо AVERROR
Когда controller broadcast'ит overlay command ко всем cuda_grid instances (quad/single/mpp), overlay с cell=2 (gate_lpr cell в quad/mpp) попадает в single layout который имеет nb_cells=1 → overlay_pixel_rect возвращал AVERROR(EINVAL) → render_overlays propagated к cuda_grid_compose → "Error while filtering: Invalid argument" каждый frame → pipeline crash loop. Fix: return 1 (positive skip) вместо AVERROR. render_overlay_rect уже имеет `if (ret != 0) return ret < 0 ? ret : 0;` — positive skip правильно обрабатывается без error. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -476,7 +476,10 @@ static int overlay_pixel_rect(CudaGridContext *s, const GridOverlay *ov,
|
||||
base_w = s->cell_px[ov->cell].w;
|
||||
base_h = s->cell_px[ov->cell].h;
|
||||
} else {
|
||||
return AVERROR(EINVAL);
|
||||
/* Cell index out of range — silently skip (overlay broadcast'нет ко всем
|
||||
* cuda_grid instances, layouts с меньшим nb_cells). NOT error чтобы
|
||||
* не валить filter chain. */
|
||||
return 1;
|
||||
}
|
||||
|
||||
rx = base_x + (int)(ov->x * base_w);
|
||||
|
||||
Reference in New Issue
Block a user