fixed a nasty code duplication where the same function call was two places

with just a few lines in between, but in separate #if cases.
parent e8e9297e
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* subsdec.c : SPU decoder thread * subsdec.c : SPU decoder thread
***************************************************************************** *****************************************************************************
* Copyright (C) 2000-2001 VideoLAN * Copyright (C) 2000-2001 VideoLAN
* $Id: subsdec.c,v 1.2 2003/07/22 22:02:44 hartman Exp $ * $Id: subsdec.c,v 1.3 2003/07/24 19:07:03 sigmunau Exp $
* *
* Authors: Gildas Bazin <gbazin@netcourrier.com> * Authors: Gildas Bazin <gbazin@netcourrier.com>
* Samuel Hocevar <sam@zoy.org> * Samuel Hocevar <sam@zoy.org>
...@@ -329,15 +329,14 @@ void E_(ParseText)( subsdec_thread_t *p_subsdec ) ...@@ -329,15 +329,14 @@ void E_(ParseText)( subsdec_thread_t *p_subsdec )
else else
{ {
msg_Dbg( p_subsdec->p_fifo, "reencoded \"%s\" into \"%s\"", psz_subtitle, psz_new_subtitle ); msg_Dbg( p_subsdec->p_fifo, "reencoded \"%s\" into \"%s\"", psz_subtitle, psz_new_subtitle );
vout_ShowTextAbsolute( p_subsdec->p_vout, psz_new_subtitle, NULL, psz_subtitle = psz_new_subtitle;
OSD_ALIGN_BOTTOM|OSD_ALIGN_LEFT, 20, 20,
i_pts, i_dts );
} }
free( psz_new_subtitle ); #endif
#else
vout_ShowTextAbsolute( p_subsdec->p_vout, psz_subtitle, NULL, vout_ShowTextAbsolute( p_subsdec->p_vout, psz_subtitle, NULL,
OSD_ALIGN_BOTTOM|OSD_ALIGN_LEFT, 20, 20, OSD_ALIGN_BOTTOM|OSD_ALIGN_LEFT, 20, 20,
i_pts, i_dts ); i_pts, i_dts );
#if defined(HAVE_ICONV)
free( psz_new_subtitle );
#endif #endif
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment