[vlc-devel] commit: Fixed segfault when the subpicture scaler failed. (Laurent Aimar )
git version control
git at videolan.org
Wed Aug 27 01:00:14 CEST 2008
vlc | branch: master | Laurent Aimar <fenrir at videolan.org> | Wed Aug 27 01:01:44 2008 +0200| [ff6b945faffba31093c780f02c3f8684307f2ba6] | committer: Laurent Aimar
Fixed segfault when the subpicture scaler failed.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=ff6b945faffba31093c780f02c3f8684307f2ba6
---
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