p->output_surfaces gets freed by destroy_frame when quitting
Unified · Split
| @@ -406,18 +406,11 @@ static void va_pool_set_allocator(struct mp_image_pool *pool, · 405 unmodified lines | ||
| 406 | 406 | mp_image_pool_set_lru(pool); |
| 407 | 407 | } |
| 408 | 408 | |
| 409 | −static void flush_output_surfaces(struct priv *p) | |
| 410 | −{ | |
| 411 | − for (int n = 0; n < MAX_OUTPUT_SURFACES; n++) | |
| 412 | − mp_image_unrefp(&p->output_surfaces[n]); | |
| 413 | − p->output_surface = 0; | |
| 414 | − p->visible_surface = 0; | |
| 415 | −} | |
| 416 | − | |
| 417 | 409 | // See flush_surfaces() remarks - the same applies. |
| 418 | 410 | static void free_video_specific(struct priv *p) |
| 419 | 411 | { |
| 420 | − flush_output_surfaces(p); | |
| 412 | + p->output_surface = 0; | |
| 413 | + p->visible_surface = 0; | |
| 421 | 414 | |
| 422 | 415 | mp_image_unrefp(&p->black_surface); |
| 423 | 416 | |