changeset 19896:7f0caf768528

demuxer->movi_end is updated after ds_fill_buffer(), this in demux_mpg_probe() end_seq_start must be assigned after ds_fill_buffer
author nicodvb
date Mon, 18 Sep 2006 22:32:51 +0000
parents 1beb8cfbc948
children b69d78e8aee8
files libmpdemux/demux_mpg.c
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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;