changeset 21486:37d60df833cc

disable telecining when it can't be applied
author nicodvb
date Mon, 04 Dec 2006 22:08:11 +0000
parents 2d87895e58fb
children f804449155bd
files libmpdemux/muxer_mpeg.c
diffstat 1 files changed, 13 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/libmpdemux/muxer_mpeg.c	Mon Dec 04 21:58:07 2006 +0000
+++ b/libmpdemux/muxer_mpeg.c	Mon Dec 04 22:08:11 2006 +0000
@@ -2601,9 +2601,17 @@
 		tfps *= 2;
 	}
 	
+	if(((tfps - sfps)>>1) > sfps)
+	{
+		mp_msg(MSGT_MUXER, MSGL_ERR, "ERROR! Framerate increment must be <= 1.5, telecining disabled\n");
+		conf_telecine = 0;
+	}
+	else
+	{
 	generate_flags(sfps, tfps);
 	conf_telecine = TELECINE_DGPULLDOWN;
 	conf_vframerate = conf_telecine_dest;
+	}
   }
 
   if(conf_vframerate)
@@ -2638,7 +2646,12 @@
 			priv->vframerate = FRAMERATE_60;
 			break;
 		default:
+		{
 			mp_msg(MSGT_MUXER, MSGL_ERR, "WRONG FPS: %d/1000, ignoring\n", fps);
+			if(conf_telecine)
+				mp_msg(MSGT_MUXER, MSGL_ERR, "DISABLED TELECINING\n");
+			conf_telecine = 0;
+		}
 	}
   }