[vlc-devel] commit: Fixed segfault when the subpicture scaler failed. (Laurent Aimar )
git version control
git at videolan.org
Wed Aug 27 01:13:03 CEST 2008
vlc | branch: 0.9-bugfix | Laurent Aimar <fenrir at videolan.org> | Wed Aug 27 01:01:44 2008 +0200| [974ac77a65d1967d50b470b2b2abda1932ab7962] | committer: Antoine Cellerier
Fixed segfault when the subpicture scaler failed.
(cherry picked from commit ff6b945faffba31093c780f02c3f8684307f2ba6)
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=974ac77a65d1967d50b470b2b2abda1932ab7962
---
src/video_output/vout_subpictures.c | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/src/video_output/vout_subpictures.c b/src/video_output/vout_subpictures.c
index 723df0d..f171693 100644
--- a/src/video_output/vout_subpictures.c
+++ b/src/video_output/vout_subpictures.c
@@ -785,11 +785,18 @@ static void SpuRenderRegion( spu_t *p_spu,
p_pic = p_scale->pf_video_filter( p_scale, &p_region->p_cache->picture );
else
msg_Err( p_spu, "scaling failed (module not loaded)" );
+
if( p_pic )
{
p_region->p_cache->picture = *p_pic;
free( p_pic );
}
+ else
+ {
+ p_subpic->pf_destroy_region( VLC_OBJECT(p_spu),
+ p_region->p_cache );
+ p_region->p_cache = NULL;
+ }
}
/* And use the scaled picture */
More information about the vlc-devel
mailing list