[vlc-commits] vaapi/deinterlace: flush the history when closing the filter
Steve Lhomme
git at videolan.org
Tue Oct 13 15:00:03 CEST 2020
vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Tue Oct 13 13:29:35 2020 +0200| [05fc34f462d7f7eec67026d4b48ed6a96a1c5900] | committer: Steve Lhomme
vaapi/deinterlace: flush the history when closing the filter
There is no guarantee fluash has been called before and it does a lot of the
cleaning we do in Close.
No need to check for NULL when calling free().
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=05fc34f462d7f7eec67026d4b48ed6a96a1c5900
---
modules/hw/vaapi/filters.c | 11 +++--------
1 file changed, 3 insertions(+), 8 deletions(-)
diff --git a/modules/hw/vaapi/filters.c b/modules/hw/vaapi/filters.c
index 36477fc213..bd933ac8c6 100644
--- a/modules/hw/vaapi/filters.c
+++ b/modules/hw/vaapi/filters.c
@@ -1074,14 +1074,9 @@ static void CloseDeinterlace(filter_t *filter)
filter_sys_t *const filter_sys = filter->p_sys;
struct deint_data *const p_data = filter_sys->p_data;
- if (p_data->forward_refs.surfaces)
- free(p_data->forward_refs.surfaces);
- if (p_data->history.pp_pics)
- {
- while (p_data->history.num_pics)
- picture_Release(p_data->history.pp_pics[--p_data->history.num_pics]);
- free(p_data->history.pp_pics);
- }
+ Deinterlace_Flush(filter);
+ free(p_data->forward_refs.surfaces);
+ free(p_data->history.pp_pics);
free(p_data);
Close(filter, filter_sys);
}
More information about the vlc-commits
mailing list