[MPlayer-users] doesn't build with new libdvdnav

Jonas Jermann jjermann at gmx.net
Mon Aug 5 14:36:01 CEST 2002


Hi

On Mon, Aug 05, 2002 at 01:43:03PM +0200, Goetz Waschk wrote:
> Hi everyone,
> 
> recent libdvdnav 0.1.3 has a incompatible API change, I cannot compile
> current MPlayer with it:
> 
> gcc -c -O4 -march=pentium3 -mcpu=pentium3 -pipe -ffast-math -fomit-frame-pointer -D_REENTRANT -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -Ilibmpdemux -Iloader -Ilibvo -I-I/usr/include -I/usr/include/dvdnav   -o mplayer.o mplayer.c
> mplayer.c: In function `main':
> mplayer.c:1284: warning: assignment makes pointer from integer without a cast
> mplayer.c:1285: warning: assignment makes pointer from integer without a cast
> mplayer.c:2695: `dvdnav_stream_change_event_t' undeclared (first use in this function)
> mplayer.c:2695: (Each undeclared identifier is reported only once
> mplayer.c:2695: for each function it appears in.)
> mplayer.c:2695: `stream_change' undeclared (first use in this function)
> mplayer.c:2695: parse error before ')' token
> mplayer.c:2713: parse error before ')' token

Same for me:
dvdnav_stream_change_event_t changed to 
dvdnav_audio/spu/etc_event_t. Here's a really ugly patch (made 
in ~ 1min, not backward compatible, not tested) which should make
it work again...


Regards
    Jonas
-------------- next part --------------
--- mplayer.c	2002-08-05 14:17:29.000000000 +0200
+++ mplayer.c	2002-08-05 11:37:11.000000000 +0200
@@ -2692,17 +2692,20 @@
         break;
         }
       case DVDNAV_SPU_STREAM_CHANGE: {
-        dvdnav_stream_change_event_t * stream_change=(dvdnav_stream_change_event_t*)(dvdnav_event->details);
+        //dvdnav_stream_change_event_t *stream_change = (dvdnav_stream_change_event_t*)(dvdnav_event->details);
+        dvdnav_spu_stream_change_event_t *stream_change = (dvdnav_spu_stream_change_event_t*)(dvdnav_event->details);
 
-        printf("DVDNAV Event: Nav SPU Stream Change: phys: %d logical: %d\n",
-                stream_change->physical,
+        printf("DVDNAV Event: Nav SPU Stream Change: phys: %d/%d/%d logical: %d\n",
+                stream_change->physical_wide,
+                stream_change->physical_letterbox,
+                stream_change->physical_pan_scan,
                 stream_change->logical);
 
-        if (vo_spudec && dvdsub_id!=stream_change->physical) {
+        if (vo_spudec && dvdsub_id!=stream_change->physical_wide) {
                 mp_msg(MSGT_INPUT,MSGL_DBG2,"d_dvdsub->id change: was %d is now %d\n",
-                        d_dvdsub->id,stream_change->physical);
+                        d_dvdsub->id,stream_change->physical_wide);
                 // FIXME: need a better way to change SPU id
-                d_dvdsub->id=dvdsub_id=stream_change->physical;
+                d_dvdsub->id=dvdsub_id=stream_change->physical_wide;
                 if (vo_spudec) spudec_reset(vo_spudec);
         }
 
@@ -2710,7 +2713,8 @@
         }
       case DVDNAV_AUDIO_STREAM_CHANGE: {
         int aid_temp;
-        dvdnav_stream_change_event_t *stream_change = (dvdnav_stream_change_event_t*)(dvdnav_event->details);
+        //dvdnav_stream_change_event_t *stream_change = (dvdnav_stream_change_event_t*)(dvdnav_event->details);
+        dvdnav_audio_stream_change_event_t *stream_change = (dvdnav_audio_stream_change_event_t*)(dvdnav_event->details);
 
         printf("DVDNAV Event: Nav Audio Stream Change: phys: %d logical: %d\n",
                 stream_change->physical,


More information about the MPlayer-users mailing list