[MPlayer-dev-eng] fix braindamaged -edlout behavior

Reimar Doeffinger Reimar.Doeffinger at stud.uni-karlsruhe.de
Tue Jul 4 14:51:42 CEST 2006


Hi,
On Tue, Jul 04, 2006 at 05:36:40AM -0400, Reynaldo H. Verdejo Pinochet wrote:
> +float begin_skip = 0; ///< start time of the current skip while on edlout mode

I think this maybe should be made double, mostly for the reason given
below.

>      case MP_CMD_EDL_MARK:
> -      if( edl_fd ) {
> -	float v = sh_video ? sh_video->pts :
> -	    playing_audio_pts(sh_audio, d_audio, audio_out);
> -	fprintf( edl_fd, "%f %f %d\n", v-2, v, 0 );
> -      }
> +		if( edl_fd ) {
> +			float v = sh_video ? sh_video->pts :
> +			playing_audio_pts(sh_audio, d_audio, audio_out);
> +
> +			if( begin_skip == 0 )
> +			{
> +				begin_skip = v; 

IMHO these both should be double, since 0 might be a valid pts
timestamp. MP_NOPTS_VALUE should be used instead, but that probably will
not work with float.

And despite the horrible mixture of tabs and space in the current code,
resend without cosmetic changes.
Also, most of the surrounding code uses spaces, not tabs, so I'd prefer
the new code to do this as well...

Greetings,
Reimar Doeffinger



More information about the MPlayer-dev-eng mailing list