From 5234c6f760e1e2eb3fdd4a1b747f6d5a9effbad7 Mon Sep 17 00:00:00 2001 From: James Stembridge Date: Tue, 13 Jan 2004 20:44:22 +0000 Subject: Pass framerate to real decoder in standard manner CVS patchset: 6041 CVS date: 2004/01/13 20:44:22 --- src/demuxers/demux_matroska.c | 6 +++--- src/libreal/xine_decoder.c | 11 +++++++---- src/xine-engine/buffer.h | 3 +-- 3 files changed, 11 insertions(+), 9 deletions(-) diff --git a/src/demuxers/demux_matroska.c b/src/demuxers/demux_matroska.c index 3d80c31ff..0699e1536 100644 --- a/src/demuxers/demux_matroska.c +++ b/src/demuxers/demux_matroska.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: demux_matroska.c,v 1.12 2004/01/12 22:42:54 jstembridge Exp $ + * $Id: demux_matroska.c,v 1.13 2004/01/13 20:44:22 jstembridge Exp $ * * demultiplexer for matroska streams * @@ -791,11 +791,11 @@ static void handle_realvideo (demux_matroska_t *this, matroska_track_t *track, buf = track->fifo->buffer_pool_alloc(track->fifo); - buf->decoder_flags = BUF_FLAG_SPECIAL; + buf->decoder_flags = BUF_FLAG_SPECIAL | BUF_FLAG_FRAMERATE; + buf->decoder_info[0] = frame_duration; buf->decoder_info[1] = BUF_SPECIAL_RV_CHUNK_TABLE; buf->decoder_info[2] = chunks; buf->decoder_info_ptr[2] = buf->content; - buf->decoder_info[3] = frame_duration; buf->size = chunk_tab_size; buf->type = track->buf_type; diff --git a/src/libreal/xine_decoder.c b/src/libreal/xine_decoder.c index 56757de0d..3234ea139 100644 --- a/src/libreal/xine_decoder.c +++ b/src/libreal/xine_decoder.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: xine_decoder.c,v 1.63 2004/01/12 23:45:04 jstembridge Exp $ + * $Id: xine_decoder.c,v 1.64 2004/01/13 20:44:22 jstembridge Exp $ * * thin layer to use real binary-only codecs in xine * @@ -271,6 +271,12 @@ static void realdec_decode_data (video_decoder_t *this_gen, buf_element_t *buf) _x_stream_info_set(this->stream, XINE_STREAM_INFO_VIDEO_HANDLED, 0); } else if (this->decoder_ok && this->context) { + + /* Frame duration can be passed from demuxer to override value in + * real video header */ + + if (buf->decoder_flags & BUF_FLAG_FRAMERATE) + this->duration = buf->decoder_info[0]; /* Each frame starts with BUF_FLAG_FRAME_START and ends with * BUF_FLAG_FRAME_END. @@ -318,9 +324,6 @@ static void realdec_decode_data (video_decoder_t *this_gen, buf_element_t *buf) lprintf ("chunk table\n"); - if(buf->decoder_info[3]) - this->duration = buf->decoder_info[3]; - transform_in[0] = this->chunk_buffer_size; /* length of the packet (sub-packets appended) */ transform_in[1] = 0; /* unknown, seems to be unused */ transform_in[2] = buf->decoder_info[2]; /* number of sub-packets - 1 */ diff --git a/src/xine-engine/buffer.h b/src/xine-engine/buffer.h index 67a598bea..70e626b0c 100644 --- a/src/xine-engine/buffer.h +++ b/src/xine-engine/buffer.h @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: buffer.h,v 1.129 2004/01/10 01:34:50 tmattern Exp $ + * $Id: buffer.h,v 1.130 2004/01/13 20:44:23 jstembridge Exp $ * * * contents: @@ -444,7 +444,6 @@ struct buf_element_s { * decoder_info[1] = BUF_SPECIAL_RV_CHUNK_TABLE * decoder_info[2] = number of entries in chunk table * decoder_info_ptr[2] = pointer to the chunk table - * decoder_info[3] = frame duration * * This buffer transports the chunk table associated to each RealVideo frame. */ -- cgit v1.2.3