# HG changeset patch # User nicodvb # Date 1191014006 0 # Node ID dcba95743b2f05158a4641c364ff42f95edd8bd0 # Parent 36c574ac10080706efcb653529aa78eb0b742da9 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) diff -r 36c574ac1008 -r dcba95743b2f libmpdemux/muxer_mpeg.c --- 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); }