[prev in list] [next in list] [prev in thread] [next in thread] 

List:       mplayer-users
Subject:    [Mplayer-users] a question about fast forward
From:       Przemysław_Kędzierski <pked () go2 ! pl>
Date:       2001-07-31 23:36:27
Message-ID: Pine.LNX.4.21.0107302220010.910-100000 () zero ! null
[Download RAW message or body]


Hello
My name is Przemek, I'm from Poland.
I'm sorry for my poor English, I haven't used it for ages.
I have Red Hat Linux 7.0, kernel 2.2.19, gcc 2.95.3, ( and Duron 750 processor).
I got mplayer sources from CVS on 24th July.
I tried to play one avi/DivX movie.
I had problems with sound and I set ni = yes.
The mplayer worked well but when I tried move forward 10 minutes
it stopped for a minute.
On other files moving forward was ok, but for this one was very slow.
I tried to find the problem.
I found that all this time program spent in loop in
the demux_avi_fill_buffer_ni() function.
Here is some lines from index of this avi file:
    0:  01wb    10  00000004  7225
    1:  00dc    10  00001C46  1162
    2:  01wb    10  000020D8  8068
    3:  00dc     0  00004064  117
    4:  00dc     0  000040E2  117
    5:  00dc     0  00004160  117
the video stream is divided in very small packages, and every single package
was skipped in one call of the demux_avi_read_packet(). 
I added one condition to the demux_avi_fill_buffer_ni() :
(...)
> if((skip_video_frames>0) && \
> ds && (ds==demux->video) && \
> (demux_avi_select_stream(demux,((AVIINDEXENTRY *)demux->idx)[idx_pos].ckid)    \
> --skip_video_frames; ret=0;
> } else {
  if(demux->idx_size>0 && idx_pos<demux->idx_size){
(...)
  } else return 0;
  ret=demux_avi_read_packet(demux,id,len,idx_pos,flags);
> }
      if(!ret && skip_video_frames<=0)
(...)
and moving forward works faster. When it skips package it doesn't call
the demux_avi_read_packet() function.

In the begginning of the demux_avi_fill_buffer_ni() I saw code:

  if(ds==demux->video) idx_pos=demux->idx_pos_a++; else
  if(ds==demux->audio) idx_pos=demux->idx_pos_v++; else
                       idx_pos=demux->idx_pos++;

It looks like a bug, if there is the video stream it gets index of
package of audio stream and index of package of video stream for audio stream.

I have a question of the main function in mplayer.c, 
why in the code block beggining of 'switch(file_format)' and 'case DEMUXER_TYPE_AVI:'
is 'demuxer->idx_pos_v' set two times, second time to position of package
of audio stream ?

Thank you

Przemek



_______________________________________________
Mplayer-users mailing list
Mplayer-users@lists.sourceforge.net
http://lists.sourceforge.net/lists/listinfo/mplayer-users


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic