changeset 17591:455d1aef7d97

init frame duration to 1/fps when we have a frame but not the enclosing sequence header: it's workaround against lavf's demuxer that doesn't sync to seq_hdr unlike mplayer's native demuxers
author nicodvb
date Sat, 11 Feb 2006 21:45:42 +0000
parents 2fd66535616a
children 8af70af65e97
files libmpdemux/muxer_mpeg.c
diffstat 1 files changed, 2 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/libmpdemux/muxer_mpeg.c	Sat Feb 11 21:29:03 2006 +0000
+++ b/libmpdemux/muxer_mpeg.c	Sat Feb 11 21:45:42 2006 +0000
@@ -1927,6 +1927,8 @@
 		} 
 		else 
 		{
+			if(!spriv->nom_delta_pts)	//workaround: lavf doesn't sync to sequence headers before passing demux_packets
+				spriv->delta_pts = spriv->nom_delta_pts = parse_fps(fps);
 			pt = (s->buffer[ptr+5] & 0x1c) >> 3;
 			temp_ref = (s->buffer[ptr+4]<<2)+(s->buffer[ptr+5]>>6);
 			if(!spriv->vframes)