From 574d5451fe1e82f75de1cee1fe27a3b07d054512 Mon Sep 17 00:00:00 2001 From: nicodvb Date: Sat, 11 Feb 2006 21:45:42 +0000 Subject: [PATCH] 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 git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@17592 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libmpdemux/muxer_mpeg.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libmpdemux/muxer_mpeg.c b/libmpdemux/muxer_mpeg.c index aa32499920..5f8a847377 100644 --- a/libmpdemux/muxer_mpeg.c +++ b/libmpdemux/muxer_mpeg.c @@ -1927,6 +1927,8 @@ static size_t parse_mpeg12_video(muxer_stream_t *s, muxer_priv_t *priv, muxer_he } 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)