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/libreal/xine_decoder.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'src/libreal/xine_decoder.c') 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 */ -- cgit v1.2.3