0
0
mirror of https://github.com/mpv-player/mpv.git synced 2024-09-20 12:02:23 +02:00

AVI - no audio stream fix

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@2331 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
arpi 2001-10-21 12:18:45 +00:00
parent 2255b29bfd
commit e95d9effa0
3 changed files with 4 additions and 1 deletions

View File

@ -40,6 +40,7 @@ avi_priv_t* priv=demuxer->priv;
//---- AVI header:
priv->idx_size=0;
priv->audio_streams=0;
while(1){
int id=stream_read_dword_le(demuxer->stream);
int chunksize,size2;
@ -141,6 +142,7 @@ while(1){
}
chunksize=0;
if(verbose>=1) print_wave_header(sh_audio->wf);
++priv->audio_streams;
// if(demuxer->audio->id==-1) demuxer->audio->id=stream_id;
}
break;

View File

@ -95,6 +95,7 @@ typedef struct {
int idx_offset; // ennyit kell hozzaadni az index offset ertekekhez
// interleaved PTS stuff:
int skip_video_frames;
int audio_streams;
float avi_audio_pts;
float avi_video_pts;
float pts_correction;

View File

@ -456,7 +456,7 @@ demuxer_t* demux_open_avi(demuxer_t* demuxer){
sh_video=d_video->sh;sh_video->ds=d_video;
if(d_audio->id!=-2){
mp_msg(MSGT_DEMUX,MSGL_V,"AVI: Searching for audio stream (id:%d)\n",d_audio->id);
if(!ds_fill_buffer(d_audio)){
if(!priv->audio_streams || !ds_fill_buffer(d_audio)){
mp_msg(MSGT_DEMUX,MSGL_INFO,"AVI: " MSGTR_MissingAudioStream);
sh_audio=NULL;
} else {