RCS file: /cvsroot/mplayer/main/libmpdemux/demux_avi.c,v
retrieving revision 1.61
diff -u -r1.61 demux_avi.c
|
|
|
|
| 629 | 629 | |
| 630 | 630 | //FIXME: OFF_T - Didn't check AVI case yet (avi files can't be >2G anyway?) |
| 631 | 631 | //================= seek in AVI ========================== |
| 632 | | int rel_seek_frames=rel_seek_secs*sh_video->fps; |
| 633 | 632 | int video_chunk_pos=d_video->pos; |
| | 633 | if (sh_video) { |
| | 634 | int rel_seek_frames=rel_seek_secs*sh_video->fps; |
| 634 | 635 | int i; |
| 635 | 636 | |
| 636 | 637 | if(flags&1){ |
| … |
… |
|
| 680 | 681 | d_video->pos=video_chunk_pos; |
| 681 | 682 | |
| 682 | 683 | mp_msg(MSGT_SEEK,MSGL_DBG2,"V_SEEK: pack=%d pts=%5.3f chunk=%d \n",d_video->pack_no,priv->avi_video_pts,video_chunk_pos); |
| | 684 | } |
| 683 | 685 | |
| 684 | 686 | // ------------ STEP 2: seek audio, find the right chunk & pos ------------ |
| 685 | 687 | |
| … |
… |
|
| 694 | 696 | int skip_audio_bytes=0; |
| 695 | 697 | int curr_audio_pos=-1; |
| 696 | 698 | int audio_chunk_pos=-1; |
| 697 | | int chunk_max=(demuxer->type==DEMUXER_TYPE_AVI)?video_chunk_pos:priv->idx_size; |
| | 699 | int chunk_max=(demuxer->type==DEMUXER_TYPE_AVI && sh_video)?video_chunk_pos:priv->idx_size; |
| 698 | 700 | |
| 699 | 701 | if(sh_audio->audio.dwSampleSize){ |
| 700 | 702 | // constant rate audio stream |
| … |
… |
|
| 784 | 786 | if(avi_stream_id(id)==d_video->id) ++priv->skip_video_frames; |
| 785 | 787 | } |
| 786 | 788 | // requires for correct audio pts calculation (demuxer): |
| | 789 | if (sh_video) |
| 787 | 790 | priv->avi_video_pts-=priv->skip_video_frames*(float)sh_video->video.dwScale/(float)sh_video->video.dwRate; |
| 788 | 791 | priv->avi_audio_pts=priv->avi_video_pts; |
| 789 | 792 | // set index position: |