changeset 17814:8f2e94a4a4c1

check pce_ptr before using it; fixes cid 207
author nicodvb
date Sat, 11 Mar 2006 23:15:57 +0000
parents f34f61843448
children 36a155ee4d27
files libmpdemux/muxer_mpeg.c
diffstat 1 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/libmpdemux/muxer_mpeg.c	Sat Mar 11 22:43:28 2006 +0000
+++ b/libmpdemux/muxer_mpeg.c	Sat Mar 11 23:15:57 2006 +0000
@@ -1794,6 +1794,9 @@
 	uint8_t fps, tff, rff; 
 	int period; 
 	
+	if(! pce_ptr)
+		return 0;
+	
 	period = (vpriv->telecine == TELECINE_FILM2PAL) ? 12 : 4;
 	if(fps_ptr != NULL)
 	{
@@ -1829,8 +1832,6 @@
 	if(se_ptr)
 		se_ptr[1] &= 0xf7;
 	
-	if(! pce_ptr)
-		return 0;
 			
 	if(! vpriv->vframes)	//initial value of tff
 		vpriv->trf = (pce_ptr[3] >> 6) & 0x2;