Mercurial > mplayer.hg
comparison mencoder.c @ 5629:9b422f216fb5
-skiplimit/-noskip options to disable fps correction
author | arpi |
---|---|
date | Mon, 15 Apr 2002 02:33:05 +0000 |
parents | b7b40e65c070 |
children | 391931fa79a6 |
comparison
equal
deleted
inserted
replaced
5628:e1179cdffbf5 | 5629:9b422f216fb5 |
---|---|
130 static float max_pts_correction=0;//default_max_pts_correction; | 130 static float max_pts_correction=0;//default_max_pts_correction; |
131 static float c_total=0; | 131 static float c_total=0; |
132 | 132 |
133 float force_fps=0; | 133 float force_fps=0; |
134 float force_ofps=0; // set to 24 for inverse telecine | 134 float force_ofps=0; // set to 24 for inverse telecine |
135 static int skip_limit=-1; | |
135 | 136 |
136 int force_srate=0; | 137 int force_srate=0; |
137 | 138 |
138 char* out_filename="test.avi"; | 139 char* out_filename="test.avi"; |
139 char* mp3_filename=NULL; | 140 char* mp3_filename=NULL; |
860 // printf("Current fno=%d requested=%d skip=%d \n",decoded_frameno,fno,skip_flag); | 861 // printf("Current fno=%d requested=%d skip=%d \n",decoded_frameno,fno,skip_flag); |
861 } else { | 862 } else { |
862 | 863 |
863 // check frame duplicate/drop: | 864 // check frame duplicate/drop: |
864 | 865 |
865 if(v_timer_corr>=(float)mux_v->h.dwScale/mux_v->h.dwRate){ | 866 if(v_timer_corr>=(float)mux_v->h.dwScale/mux_v->h.dwRate && |
867 (skip_limit<0 || skip_flag<skip_limit) ){ | |
866 v_timer_corr-=(float)mux_v->h.dwScale/mux_v->h.dwRate; | 868 v_timer_corr-=(float)mux_v->h.dwScale/mux_v->h.dwRate; |
867 ++skip_flag; // skip | 869 ++skip_flag; // skip |
868 } else | 870 } else |
869 while(v_timer_corr<=-(float)mux_v->h.dwScale/mux_v->h.dwRate){ | 871 while(v_timer_corr<=-(float)mux_v->h.dwScale/mux_v->h.dwRate && |
872 (skip_limit<0 || (-skip_flag)<skip_limit) ){ | |
870 v_timer_corr+=(float)mux_v->h.dwScale/mux_v->h.dwRate; | 873 v_timer_corr+=(float)mux_v->h.dwScale/mux_v->h.dwRate; |
871 --skip_flag; // dup | 874 --skip_flag; // dup |
872 } | 875 } |
873 | 876 |
874 while( (v_pts_corr<=-(float)mux_v->h.dwScale/mux_v->h.dwRate && skip_flag>0) | 877 while( (v_pts_corr<=-(float)mux_v->h.dwScale/mux_v->h.dwRate && skip_flag>0) |