comparison libmpdemux/demux_mpg.c @ 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 c68cf9a578a8
children 447e41fbcb4e
comparison
equal deleted inserted replaced
19895:1beb8cfbc948 19896:7f0caf768528
104 104
105 /// Open an mpg physical stream 105 /// Open an mpg physical stream
106 static demuxer_t* demux_mpg_open(demuxer_t* demuxer) { 106 static demuxer_t* demux_mpg_open(demuxer_t* demuxer) {
107 stream_t *s = demuxer->stream; 107 stream_t *s = demuxer->stream;
108 off_t pos = stream_tell(s); 108 off_t pos = stream_tell(s);
109 off_t end_seq_start = demuxer->movi_end-TIMESTAMP_PROBE_LEN; 109 off_t end_seq_start;
110 float half_pts = 0.0; 110 float half_pts = 0.0;
111 mpg_demuxer_t* mpg_d; 111 mpg_demuxer_t* mpg_d;
112 112
113 if (!ds_fill_buffer(demuxer->video)) return 0; 113 if (!ds_fill_buffer(demuxer->video)) return 0;
114 end_seq_start = demuxer->movi_end-TIMESTAMP_PROBE_LEN;
114 mpg_d = calloc(1,sizeof(mpg_demuxer_t)); 115 mpg_d = calloc(1,sizeof(mpg_demuxer_t));
115 demuxer->priv = mpg_d; 116 demuxer->priv = mpg_d;
116 mpg_d->final_pts = 0.0; 117 mpg_d->final_pts = 0.0;
117 mpg_d->has_valid_timestamps = 1; 118 mpg_d->has_valid_timestamps = 1;
118 mpg_d->num_a_streams = 0; 119 mpg_d->num_a_streams = 0;