changeset 6156:f961a25a9257

10L bugfix
author albeu
date Thu, 23 May 2002 09:47:18 +0000
parents ce81fb6e3309
children 271cf9893cae
files input/joystick.c libmpdemux/demux_ogg.c
diffstat 2 files changed, 5 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/input/joystick.c	Wed May 22 20:47:30 2002 +0000
+++ b/input/joystick.c	Thu May 23 09:47:18 2002 +0000
@@ -46,7 +46,7 @@
   while(! inited) {
     l = 0;
     while((unsigned int)l < sizeof(struct js_event)) {
-      int r = read(fd,&ev+l,sizeof(struct js_event)-l);
+      int r = read(fd,((char*)&ev)+l,sizeof(struct js_event)-l);
       if(r < 0) {
 	if(errno == EINTR)
 	  continue;
--- a/libmpdemux/demux_ogg.c	Wed May 22 20:47:30 2002 +0000
+++ b/libmpdemux/demux_ogg.c	Thu May 23 09:47:18 2002 +0000
@@ -534,10 +534,11 @@
 //	  if(sh_a->wf) print_wave_header(sh_a->wf);
 	}
 	/// Is it the stream we want
-	if(demuxer->audio->id == ogg_d->num_sub)
+	if(demuxer->audio->id == ogg_d->num_sub) {
 	  demuxer->audio->sh = sh_a;
 	  sh_a->ds = demuxer->audio;
 	  ds = demuxer->audio;
+	}
       }
       if(sh_v) {
 	/// Also for video
@@ -545,10 +546,11 @@
 	  demuxer->video->id = ogg_d->num_sub;
 //	  if(sh_v->bih) print_video_header(sh_v->bih);
 	}
-	if(demuxer->video->id == ogg_d->num_sub)
+	if(demuxer->video->id == ogg_d->num_sub) {
 	  demuxer->video->sh = sh_v;
 	  sh_v->ds = demuxer->video;
 	  ds = demuxer->video;
+	}
       }
       /// Add the header packets if the stream isn't seekable
       if(ds && (!s->end_pos || index_mode != 2)) {