From 2ce81d93218aef7cd8fb362d3e1881237b41b5eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20=27Flameeyes=27=20Petten=C3=B2?= Date: Mon, 25 Jun 2007 13:05:45 +0200 Subject: Instead of declaring op_size, use sizeof(ogg_packet) directly. --- src/libxinevdec/xine_theora_decoder.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/libxinevdec/xine_theora_decoder.c b/src/libxinevdec/xine_theora_decoder.c index 032f8800f..237eed0a9 100644 --- a/src/libxinevdec/xine_theora_decoder.c +++ b/src/libxinevdec/xine_theora_decoder.c @@ -123,23 +123,22 @@ static void yuv2frame(yuv_buffer *yuv, vo_frame_t *frame, int offset_x, int offs static int collect_data (theora_decoder_t *this, buf_element_t *buf ) { /* Assembles an ogg_packet which was sent with send_ogg_packet over xinebuffers */ /* this->done, this->rejected, this->op and this->decoder->flags are needed*/ - int op_size = sizeof (ogg_packet); if (buf->decoder_flags & BUF_FLAG_FRAME_START) { this->done=0; /*start from the beginnig*/ this->reject=0;/*new packet - new try*/ /*copy the ogg_packet struct and the sum, correct the adress of the packet*/ - xine_fast_memcpy (&this->op, buf->content, op_size); + xine_fast_memcpy (&this->op, buf->content, sizeof(ogg_packet)); this->op.packet=this->packet; - readin_op (this, buf->content + op_size, buf->size - op_size ); + readin_op (this, buf->content + sizeof(ogg_packet), buf->size - sizeof(ogg_packet) ); /*read the rest of the data*/ } else { if (this->done==0 || this->reject) { /*we are starting to collect an packet without the beginnig - reject the rest*/ + reject the rest*/ printf ("libtheora: rejecting packet\n"); this->reject=1; return 0; -- cgit v1.2.3