From e97de54628bbb06834a2fc8bc334af43b8c56ca7 Mon Sep 17 00:00:00 2001 From: James Stembridge Date: Thu, 15 Jan 2004 20:13:46 +0000 Subject: better to set buf->type before trying to read it CVS patchset: 6046 CVS date: 2004/01/15 20:13:46 --- src/demuxers/demux_real.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/demuxers/demux_real.c b/src/demuxers/demux_real.c index ac074a19c..068cf1d6a 100644 --- a/src/demuxers/demux_real.c +++ b/src/demuxers/demux_real.c @@ -31,7 +31,7 @@ * * Based on FFmpeg's libav/rm.c. * - * $Id: demux_real.c,v 1.83 2004/01/15 20:06:06 jstembridge Exp $ + * $Id: demux_real.c,v 1.84 2004/01/15 20:13:46 jstembridge Exp $ */ #ifdef HAVE_CONFIG_H @@ -1093,6 +1093,8 @@ static int demux_real_send_chunk(demux_plugin_t *this_gen) { buf->decoder_flags = decoder_flags; decoder_flags &= ~BUF_FLAG_FRAME_START; + + buf->type = this->video_stream->buf_type; if(this->input->read(this->input, buf->content, buf->size) < buf->size) { xprintf(this->stream->xine, XINE_VERBOSITY_DEBUG, @@ -1104,7 +1106,9 @@ static int demux_real_send_chunk(demux_plugin_t *this_gen) { /* RV30 and RV40 streams contain some fragments that shouldn't be passed * to the decoder. The first byte of these fragments is different from - * that found in the preceding fragments making up the frame */ + * that found in the preceding fragments making up the frame. The purpose + * of these fragments is unknown, but realplayer doesn't appear to pass + * them to the decoder either */ if((n == fragment_size) && ((buf->type == BUF_VIDEO_RV30) || buf->type == BUF_VIDEO_RV40)) { @@ -1130,8 +1134,6 @@ static int demux_real_send_chunk(demux_plugin_t *this_gen) { buf->extra_info->input_time = input_time; buf->extra_info->total_time = this->duration; - buf->type = this->video_stream->buf_type; - this->video_fifo->put(this->video_fifo, buf); n -= buf->size; -- cgit v1.2.3