changeset 24630:dcba95743b2f

1000l, the tff flag was never cleared before being overwritten with the value on bff_mask; also, the sequence extension pointer was set to point to the sequence_display_extension, so the progressive_sequence was never set and the sde was being corrupted patch by Christopher Montgomery (xhiphmont xiph org)
author nicodvb
date Fri, 28 Sep 2007 21:13:26 +0000
parents 36c574ac1008
children f61c325bca3c
files libmpdemux/muxer_mpeg.c
diffstat 1 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/libmpdemux/muxer_mpeg.c	Fri Sep 28 21:06:45 2007 +0000
+++ b/libmpdemux/muxer_mpeg.c	Fri Sep 28 21:13:26 2007 +0000
@@ -1611,7 +1611,8 @@
 	if(se_ptr)
 		se_ptr[1] &= 0xf7;
 	
-	pce_ptr[3] = (pce_ptr[3] & 0xfd) | bff_mask[vpriv->display_frame % MAX_PATTERN_LENGTH];
+	//disable tff and rff and overwrite them with the value in bff_mask
+	pce_ptr[3] = (pce_ptr[3] & 0x7d) | bff_mask[vpriv->display_frame % MAX_PATTERN_LENGTH];
 	pce_ptr[4] |= 0x80;	//sets progressive frame
 	
 	vpriv->display_frame += n;
@@ -1677,9 +1678,10 @@
 						break;
 					}
 					mp_header_process_extension(&(spriv->picture), &(s->buffer[i+4]));
+					if(((s->buffer[i+4] & 0xf0) == 0x10))
+						se_ptr = &(s->buffer[i+4]);
 					if(((s->buffer[i+4] & 0xf0) == 0x20))
 					{
-						se_ptr = &(s->buffer[i+4]);
 						if(priv->patch_sde)
 							patch_panscan(priv, se_ptr);
 					}