From 31201aff8dbc2c2bb1dadaffb0166f00e9f65b78 Mon Sep 17 00:00:00 2001 From: Guenter Bartsch Date: Sat, 9 Jun 2001 22:05:30 +0000 Subject: introducing present buffers CVS patchset: 141 CVS date: 2001/06/09 22:05:30 --- src/libmpeg2/xine_decoder.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'src/libmpeg2/xine_decoder.c') diff --git a/src/libmpeg2/xine_decoder.c b/src/libmpeg2/xine_decoder.c index ce4788d85..6783f7d20 100644 --- a/src/libmpeg2/xine_decoder.c +++ b/src/libmpeg2/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.6 2001/06/07 20:23:54 guenter Exp $ + * $Id: xine_decoder.c,v 1.7 2001/06/09 22:05:31 guenter Exp $ * * stuff needed to turn libmpeg2 into a xine decoder plugin */ @@ -55,8 +55,12 @@ static void mpeg2dec_init (video_decoder_t *this_gen, vo_instance_t *video_out) static void mpeg2dec_decode_data (video_decoder_t *this_gen, buf_element_t *buf) { mpeg2dec_decoder_t *this = (mpeg2dec_decoder_t *) this_gen; - mpeg2_decode_data (&this->mpeg2, buf->content, buf->content + buf->size, - buf->PTS); + if (buf->decoder_info[0] == 0) { + mpeg2_find_sequence_header (&this->mpeg2, buf->content, buf->content + buf->size); + } else { + mpeg2_decode_data (&this->mpeg2, buf->content, buf->content + buf->size, + buf->PTS); + } } static void mpeg2dec_close (video_decoder_t *this_gen) { -- cgit v1.2.3