[MPlayer-dev-eng] [PATCH] further dvr-ms playback improvements

Nico Sabbi nicola_sabbi at fastwebnet.it
Sat Aug 26 11:43:50 CEST 2006


Uoti Urpala wrote:

>On Sat, 2006-08-26 at 00:19 +0200, Nico Sabbi wrote:
>  
>
>>in my last patch I removed the ASF case in the switch() in video.c
>>in order to make mplayer use the timestamp deltas.
>>    
>>
>
>Yes you removed the ASF case, and since that was the only place using
>the timestamps (without -correct-pts) now they won't be used even if
>fps==1000...
>  
>

because the frametime will not be set?
If so I understand what you mean.

Yet, there's another thing that I don't understand: what special
operation is performed when sh->fps==1000 ?
video_read_frames() reads

case DEMUXER_TYPE_ASF: {
        float next_pts = ds_get_next_pts(d_video);
        float d= next_pts > 0 ? next_pts - d_video->pts : d_video->pts-pts1;
        if(d>=0){
          if(d>0){
            if((int)sh_video->fps==1000)
              mp_msg(MSGT_CPLAYER,MSGL_V,"\navg. framerate: %d fps             \n",(int)(1.0f/d));
	    sh_video->frametime=d; // 1ms
            sh_video->fps=1.0f/d;
	  }
          frame_time = d;
        } else {
          mp_msg(MSGT_CPLAYER,MSGL_WARN,"\nInvalid frame duration value (%5.3f/%5.3f => %5.3f). Defaulting to %5.3f sec.\n",d_video->pts,next_pts,d,frame_time);
          // frame_time = 1/25.0;
        }
      }
      break;


so the only thing that is executed is a mp_msg(), neither there seems to be
any special treatment of sh->fps == 1000 in mplayer.c

>And if you do something sane instead so that the timestamps are used,
>then what is the point of adding code to set fps in the decoders? The
>fps value will matter little if the timestamps are what determines
>playback timing.
>
>I'm not sure what you're trying to do with the video.c changes really.
>The current patch seems like total nonsense (just removing the timestamp
>handling as mentioned above). There already is the -correct-pts mode. If
>you're not trying to create another implementation of that then what?
>  
>

I was just trying to make cases like the one at hand playable
without -correct-pts

>How the video.c code handles asf when the demuxer sets fps=1000 doesn't
>seem to be any more broken than the other VFR cases.
>  
>

re-reading my patch at the light of day I agree it's nonsense




More information about the MPlayer-dev-eng mailing list