[vlc-commits] puzzle: fix error check, do not leak pictures on error
David Fuhrmann
git at videolan.org
Wed Mar 25 15:17:50 CET 2015
vlc/vlc-2.2 | branch: master | David Fuhrmann <dfuhrmann at videolan.org> | Sun Mar 22 19:02:28 2015 +0100| [b88dbb4d3c74c853a625d92008df4e9cddf387c6] | committer: Jean-Baptiste Kempf
puzzle: fix error check, do not leak pictures on error
close #14006
(cherry picked from commit 5c2fc028e78429b8a9d540c7fa9d227c5efa0620)
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
> http://git.videolan.org/gitweb.cgi/vlc/vlc-2.2.git/?a=commit;h=b88dbb4d3c74c853a625d92008df4e9cddf387c6
---
modules/video_filter/puzzle.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/modules/video_filter/puzzle.c b/modules/video_filter/puzzle.c
index 2fe5e0c..6c6433b 100644
--- a/modules/video_filter/puzzle.c
+++ b/modules/video_filter/puzzle.c
@@ -289,9 +289,12 @@ picture_t *Filter( filter_t *p_filter, picture_t *p_pic_in ) {
/* assert no mismatch between sizes */
if ( p_sys->s_current_param.i_pict_width != p_sys->s_current_param.i_desk_width
|| p_sys->s_current_param.i_pict_height != p_sys->s_current_param.i_desk_height
- || p_sys->s_current_param.i_pict_width != (int) p_fmt_in->i_width
- || p_sys->s_current_param.i_pict_height != (int) p_fmt_in->i_height )
+ || p_sys->s_current_param.i_pict_width != (int) p_fmt_in->i_visible_width
+ || p_sys->s_current_param.i_pict_height != (int) p_fmt_in->i_visible_height ) {
+ picture_Release(p_pic_in);
+ picture_Release(p_pic_out);
return NULL;
+ }
vlc_mutex_lock( &p_sys->lock );
More information about the vlc-commits
mailing list