Mercurial > mplayer.hg
changeset 19802:f1655de446c4
Support for variable fps OGM files, blessed by Moritz.
patch by Sergey Khlutchin, Elphel, Inc
author | diego |
---|---|
date | Tue, 12 Sep 2006 09:00:10 +0000 |
parents | 133f4d2f84c5 |
children | a8367d5b416b |
files | libmpdemux/demux_ogg.c libmpdemux/video.c |
diffstat | 2 files changed, 4 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/libmpdemux/demux_ogg.c Tue Sep 12 08:42:01 2006 +0000 +++ b/libmpdemux/demux_ogg.c Tue Sep 12 09:00:10 2006 +0000 @@ -1434,6 +1434,7 @@ float pts; int is_keyframe; int samplesize=1; + ogg_int64_t granulepos_orig; if(demuxer->video->id >= 0) { ds = demuxer->video; @@ -1552,6 +1553,7 @@ break; } is_gp_valid = (op.granulepos >= 0); + granulepos_orig=op.granulepos; demux_ogg_read_packet(os,&op,context,&pts,&is_keyframe,samplesize); if (precision && is_gp_valid) { precision--; @@ -1581,6 +1583,7 @@ vo_sub = &ogg_sub; vo_osd_changed(OSDTYPE_SUBTITLE); clear_sub = -1; + op.granulepos=granulepos_orig; demux_ogg_add_packet(ds,os,ds->id,&op); return; }
--- a/libmpdemux/video.c Tue Sep 12 08:42:01 2006 +0000 +++ b/libmpdemux/video.c Tue Sep 12 09:00:10 2006 +0000 @@ -579,6 +579,7 @@ case DEMUXER_TYPE_MOV: case DEMUXER_TYPE_FILM: case DEMUXER_TYPE_VIVO: + case DEMUXER_TYPE_OGG: case DEMUXER_TYPE_ASF: { float next_pts = ds_get_next_pts(d_video); float d= next_pts > 0 ? next_pts - d_video->pts : d_video->pts-pts1;