# HG changeset patch # User pl # Date 1006951479 0 # Node ID d53f70e3c7946a234b6d78f4cc0d2f8d8fba70b7 # Parent 6fc8473dc3746f9a57fcee6ab5a7ceaba1d67361 spudec_new has a dvd_priv_t as an argument, which is defined in libmpdemux/stream.h only if USE_DVDREAD is defined. (Arpi) diff -r 6fc8473dc374 -r d53f70e3c794 libvo/sub.c --- a/libvo/sub.c Wed Nov 28 12:34:10 2001 +0000 +++ b/libvo/sub.c Wed Nov 28 12:44:39 2001 +0000 @@ -273,10 +273,11 @@ } void *vo_spudec=NULL; - +#ifdef USE_DVDREAD inline static void vo_draw_spudec(int dxs,int dys,void (*draw_alpha)(int x0,int y0, int w,int h, unsigned char* src, unsigned char *srca, int stride)){ spudec_draw(vo_spudec, draw_alpha); } +#endif static int draw_alpha_init_flag=0; @@ -302,10 +303,11 @@ if(vo_osd_progbar_type>=0 && vo_font->font[OSD_PB_0]>=0){ vo_draw_text_progbar(dxs,dys,draw_alpha); } - +#ifdef USE_DVDREAD if(vo_spudec){ vo_draw_spudec(dxs,dys,draw_alpha); } +#endif } diff -r 6fc8473dc374 -r d53f70e3c794 mplayer.c --- a/mplayer.c Wed Nov 28 12:34:10 2001 +0000 +++ b/mplayer.c Wed Nov 28 12:44:39 2001 +0000 @@ -53,7 +53,9 @@ #include "codec-cfg.h" #include "dvdauth.h" +#ifdef USE_DVDREAD #include "spudec.h" +#endif #include "linux/getch2.h" #include "linux/keycodes.h" @@ -256,11 +258,13 @@ void uninit_player(unsigned int mask){ mask=inited_flags&mask; +#ifdef USE_DVDREAD if (mask&INITED_SPUDEC){ inited_flags&=~INITED_SPUDEC; current_module="uninit_spudec"; spudec_free(vo_spudec); } +#endif if(mask&INITED_VO){ inited_flags&=~INITED_VO; current_module="uninit_vo"; @@ -779,10 +783,12 @@ inited_flags|=INITED_STREAM; stream->start_pos+=seek_to_byte; +#ifdef USE_DVDREAD current_module="spudec"; vo_spudec=spudec_new(stream->priv); if (vo_spudec!=NULL) inited_flags|=INITED_SPUDEC; +#endif current_module=NULL; if(stream_cache_size) stream_enable_cache(stream,stream_cache_size*1024); @@ -2039,6 +2045,8 @@ } #endif + +#ifdef USE_DVDREAD // DVD sub: if(vo_spudec){ unsigned char* packet=NULL; @@ -2056,6 +2064,7 @@ } current_module=NULL; } +#endif } // while(!eof) diff -r 6fc8473dc374 -r d53f70e3c794 spudec.c --- a/spudec.c Wed Nov 28 12:34:10 2001 +0000 +++ b/spudec.c Wed Nov 28 12:44:39 2001 +0000 @@ -11,6 +11,8 @@ */ +#ifdef USE_DVDREAD + #include #include #include @@ -318,3 +320,6 @@ free(spu); } } + +#endif /* USE_DVDREAD */ + diff -r 6fc8473dc374 -r d53f70e3c794 spudec.h --- a/spudec.h Wed Nov 28 12:34:10 2001 +0000 +++ b/spudec.h Wed Nov 28 12:44:39 2001 +0000 @@ -1,3 +1,4 @@ +#ifdef USE_DVDREAD #ifndef _MPLAYER_SPUDEC_H #define _MPLAYER_SPUDEC_H @@ -10,3 +11,4 @@ void spudec_free(void *this); #endif +#endif