diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/post/goom/xine_goom.c | 2 | ||||
-rw-r--r-- | src/video_dec/libmpeg2/motion_comp.c | 2 | ||||
-rw-r--r-- | src/xine-engine/osd.c | 35 |
3 files changed, 24 insertions, 15 deletions
diff --git a/src/post/goom/xine_goom.c b/src/post/goom/xine_goom.c index dfc4036f1..03a5a3c07 100644 --- a/src/post/goom/xine_goom.c +++ b/src/post/goom/xine_goom.c @@ -48,7 +48,7 @@ #define GOOM_HEIGHT 240 /* colorspace conversion methods */ -static const char const * goom_csc_methods[]={ +static const char* goom_csc_methods[]={ "Fast but not photorealistic", "Slow but looks better", NULL diff --git a/src/video_dec/libmpeg2/motion_comp.c b/src/video_dec/libmpeg2/motion_comp.c index 9328dfb9f..4a324b8ea 100644 --- a/src/video_dec/libmpeg2/motion_comp.c +++ b/src/video_dec/libmpeg2/motion_comp.c @@ -68,7 +68,7 @@ void mpeg2_mc_init (uint32_t mm_accel) mpeg2_mc = mpeg2_mc_altivec; } else #endif -#ifdef ARCH_SPARC +#if defined(ARCH_SPARC) && defined(ENABLE_VIS) if (mm_accel & MM_ACCEL_SPARC_VIS) { #ifdef LOG fprintf (stderr, "Using VIS for motion compensation\n"); diff --git a/src/xine-engine/osd.c b/src/xine-engine/osd.c index 1d3754d42..aaeb2538f 100644 --- a/src/xine-engine/osd.c +++ b/src/xine-engine/osd.c @@ -215,6 +215,20 @@ struct osd_ft2context_s { FT_Face face; int size; }; + +static void osd_free_ft2 (osd_object_t *osd) +{ + if( osd->ft2 ) { + if ( osd->ft2->face ) + FT_Done_Face (osd->ft2->face); + if ( osd->ft2->library ) + FT_Done_FreeType(osd->ft2->library); + free( osd->ft2 ); + osd->ft2 = NULL; + } +} +#else +static inline void osd_free_ft2 (osd_object_t *osd __attr_unused) {} #endif /* @@ -1032,6 +1046,11 @@ static int osd_set_font_freetype2( osd_object_t *osd, const char *fontname, int return 0; } } + + if (osd->ft2->face) { + FT_Done_Face (osd->ft2->face); + osd->ft2->face = NULL; + } do { /* while 0 */ #ifdef HAVE_FONTCONFIG @@ -1041,16 +1060,14 @@ static int osd_set_font_freetype2( osd_object_t *osd, const char *fontname, int if ( osd_lookup_xdg(osd, fontname) ) break; - free(osd->ft2); - osd->ft2 = NULL; + osd_free_ft2 (osd); return 0; } while(0); if (FT_Set_Pixel_Sizes(osd->ft2->face, 0, size)) { xprintf(osd->renderer->stream->xine, XINE_VERBOSITY_LOG, _("osd: error setting font size (no scalable font?)\n")); - free(osd->ft2); - osd->ft2 = NULL; + osd_free_ft2 (osd); return 0; } @@ -1626,15 +1643,7 @@ static void osd_free_object (osd_object_t *osd_to_close) { if ( osd == osd_to_close ) { free( osd->area ); -#ifdef HAVE_FT2 - if( osd->ft2 ) { - if ( osd->ft2->library ) - FT_Done_FreeType(osd->ft2->library); - - free( osd->ft2 ); - } -#endif - + osd_free_ft2 (osd); osd_free_encoding(osd); if( last ) |