diff options
author | Mike Melanson <mike@multimedia.cx> | 2003-11-17 05:42:07 +0000 |
---|---|---|
committer | Mike Melanson <mike@multimedia.cx> | 2003-11-17 05:42:07 +0000 |
commit | 7479544593aec1206994007d029b5fdfded04a41 (patch) | |
tree | 9d213e69bee9817829c01d243f5d40a25756d94e /src | |
parent | 847f0e85e8b0c8135294258a9507fba03cc1cc30 (diff) | |
download | xine-lib-7479544593aec1206994007d029b5fdfded04a41.tar.gz xine-lib-7479544593aec1206994007d029b5fdfded04a41.tar.bz2 |
compute the proper initial frame duration
CVS patchset: 5758
CVS date: 2003/11/17 05:42:07
Diffstat (limited to 'src')
-rw-r--r-- | src/demuxers/demux_film.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/src/demuxers/demux_film.c b/src/demuxers/demux_film.c index b03ca5130..b6de020aa 100644 --- a/src/demuxers/demux_film.c +++ b/src/demuxers/demux_film.c @@ -21,7 +21,7 @@ * For more information on the FILM file format, visit: * http://www.pcisys.net/~melanson/codecs/ * - * $Id: demux_film.c,v 1.70 2003/11/16 23:33:43 f1rmb Exp $ + * $Id: demux_film.c,v 1.71 2003/11/17 05:42:07 tmmm Exp $ */ #ifdef HAVE_CONFIG_H @@ -655,6 +655,8 @@ static int demux_film_send_chunk(demux_plugin_t *this_gen) { static void demux_film_send_headers(demux_plugin_t *this_gen) { demux_film_t *this = (demux_film_t *) this_gen; buf_element_t *buf; + int64_t initial_duration = 3000; + int i; this->video_fifo = this->stream->video_fifo; this->audio_fifo = this->stream->audio_fifo; @@ -681,10 +683,17 @@ static void demux_film_send_headers(demux_plugin_t *this_gen) { /* send init info to decoders */ if (this->video_type) { + /* find the first video frame duration */ + for (i = 0; i < this->sample_count; i++) + if (!this->sample_table[i].audio) { + initial_duration = this->sample_table[i].duration; + break; + } + buf = this->video_fifo->buffer_pool_alloc (this->video_fifo); buf->decoder_flags = BUF_FLAG_HEADER; buf->decoder_info[0] = 0; - buf->decoder_info[1] = 3000; /* initial video_step */ + buf->decoder_info[1] = initial_duration; memcpy(buf->content, &this->bih, sizeof(this->bih)); buf->size = sizeof(this->bih); buf->type = this->video_type; |