comparison libmpdemux/muxer_mpeg.c @ 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 f4dacb3d428a
children 6fa1149d8c80
comparison
equal deleted inserted replaced
17590:2fd66535616a 17591:455d1aef7d97
1925 temp_ref = 0; 1925 temp_ref = 0;
1926 mp_msg(MSGT_MUXER, MSGL_ERR,"Warning: picture not found in GOP!\n"); 1926 mp_msg(MSGT_MUXER, MSGL_ERR,"Warning: picture not found in GOP!\n");
1927 } 1927 }
1928 else 1928 else
1929 { 1929 {
1930 if(!spriv->nom_delta_pts) //workaround: lavf doesn't sync to sequence headers before passing demux_packets
1931 spriv->delta_pts = spriv->nom_delta_pts = parse_fps(fps);
1930 pt = (s->buffer[ptr+5] & 0x1c) >> 3; 1932 pt = (s->buffer[ptr+5] & 0x1c) >> 3;
1931 temp_ref = (s->buffer[ptr+4]<<2)+(s->buffer[ptr+5]>>6); 1933 temp_ref = (s->buffer[ptr+4]<<2)+(s->buffer[ptr+5]>>6);
1932 if(!spriv->vframes) 1934 if(!spriv->vframes)
1933 spriv->last_tr = spriv->max_tr = temp_ref; 1935 spriv->last_tr = spriv->max_tr = temp_ref;
1934 d1 = temp_ref - spriv->last_tr; 1936 d1 = temp_ref - spriv->last_tr;