1
0
mirror of https://github.com/mpv-player/mpv synced 2025-02-17 04:58:06 +00:00

10L bugfix

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@6157 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
albeu 2002-05-23 09:47:18 +00:00
parent 447bd59e69
commit a62815933c
2 changed files with 5 additions and 3 deletions

View File

@ -46,7 +46,7 @@ int mp_input_joystick_init(char* dev) {
while(! inited) { while(! inited) {
l = 0; l = 0;
while((unsigned int)l < sizeof(struct js_event)) { 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(r < 0) {
if(errno == EINTR) if(errno == EINTR)
continue; continue;

View File

@ -534,22 +534,24 @@ int demux_ogg_open(demuxer_t* demuxer) {
// if(sh_a->wf) print_wave_header(sh_a->wf); // if(sh_a->wf) print_wave_header(sh_a->wf);
} }
/// Is it the stream we want /// 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; demuxer->audio->sh = sh_a;
sh_a->ds = demuxer->audio; sh_a->ds = demuxer->audio;
ds = demuxer->audio; ds = demuxer->audio;
} }
}
if(sh_v) { if(sh_v) {
/// Also for video /// Also for video
if(demuxer->video->id == -1) { if(demuxer->video->id == -1) {
demuxer->video->id = ogg_d->num_sub; demuxer->video->id = ogg_d->num_sub;
// if(sh_v->bih) print_video_header(sh_v->bih); // 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; demuxer->video->sh = sh_v;
sh_v->ds = demuxer->video; sh_v->ds = demuxer->video;
ds = demuxer->video; ds = demuxer->video;
} }
}
/// Add the header packets if the stream isn't seekable /// Add the header packets if the stream isn't seekable
if(ds && (!s->end_pos || index_mode != 2)) { if(ds && (!s->end_pos || index_mode != 2)) {
/// Finish the page, otherwise packets will be lost /// Finish the page, otherwise packets will be lost