# HG changeset patch # User nicodvb # Date 1158618771 0 # Node ID 7f0caf768528caec7b4104d8cfff4e8a1d48cc08 # Parent 1beb8cfbc9483f516b662f9838a345b2735c9496 demuxer->movi_end is updated after ds_fill_buffer(), this in demux_mpg_probe() end_seq_start must be assigned after ds_fill_buffer diff -r 1beb8cfbc948 -r 7f0caf768528 libmpdemux/demux_mpg.c --- a/libmpdemux/demux_mpg.c Mon Sep 18 22:02:43 2006 +0000 +++ b/libmpdemux/demux_mpg.c Mon Sep 18 22:32:51 2006 +0000 @@ -106,11 +106,12 @@ static demuxer_t* demux_mpg_open(demuxer_t* demuxer) { stream_t *s = demuxer->stream; off_t pos = stream_tell(s); - off_t end_seq_start = demuxer->movi_end-TIMESTAMP_PROBE_LEN; + off_t end_seq_start; float half_pts = 0.0; mpg_demuxer_t* mpg_d; if (!ds_fill_buffer(demuxer->video)) return 0; + end_seq_start = demuxer->movi_end-TIMESTAMP_PROBE_LEN; mpg_d = calloc(1,sizeof(mpg_demuxer_t)); demuxer->priv = mpg_d; mpg_d->final_pts = 0.0;