Mercurial > mplayer.hg
comparison libmpdemux/demux_avi.c @ 7785:ffe8bfaa2851
fix & workaround possible sig8/sig11 in blocksize calculation
author | arpi |
---|---|
date | Thu, 17 Oct 2002 22:12:32 +0000 |
parents | 20910550332f |
children | 2b39ff3860b7 |
comparison
equal
deleted
inserted
replaced
7784:cb552fdb7b8a | 7785:ffe8bfaa2851 |
---|---|
29 if(demux->a_streams[stream_id]) | 29 if(demux->a_streams[stream_id]) |
30 demux->audio->id=stream_id; | 30 demux->audio->id=stream_id; |
31 | 31 |
32 if(stream_id==demux->audio->id){ | 32 if(stream_id==demux->audio->id){ |
33 if(!demux->audio->sh){ | 33 if(!demux->audio->sh){ |
34 demux->audio->sh=demux->a_streams[stream_id]; | 34 sh_audio_t* sh; |
35 sh=demux->audio->sh=demux->a_streams[stream_id]; | |
35 mp_msg(MSGT_DEMUX,MSGL_V,"Auto-selected AVI audio ID = %d\n",demux->audio->id); | 36 mp_msg(MSGT_DEMUX,MSGL_V,"Auto-selected AVI audio ID = %d\n",demux->audio->id); |
36 demux->audio->block_size=((sh_audio_t*)(demux->audio->sh))->wf->nBlockAlign; | 37 if(sh->wf){ |
38 demux->audio->block_size=sh->wf->nBlockAlign; | |
39 if(!demux->audio->block_size){ | |
40 // for PCM audio we can calculate the blocksize: | |
41 if(sh->format==1) demux->audio->block_size=sh->wf->nChannels*(sh->wf->wBitsPerSample/8); | |
42 if(!demux->audio->block_size) demux->audio->block_size=1; // bug! | |
43 } | |
44 } | |
37 //printf("&&&&& setting blocksize to %d &&&&&\n",demux->audio->block_size); | 45 //printf("&&&&& setting blocksize to %d &&&&&\n",demux->audio->block_size); |
38 } | 46 } |
39 return demux->audio; | 47 return demux->audio; |
40 } | 48 } |
41 if(stream_id==demux->video->id){ | 49 if(stream_id==demux->video->id){ |