summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDiego 'Flameeyes' Pettenò <flameeyes@gmail.com>2007-06-25 13:05:45 +0200
committerDiego 'Flameeyes' Pettenò <flameeyes@gmail.com>2007-06-25 13:05:45 +0200
commit2ce81d93218aef7cd8fb362d3e1881237b41b5eb (patch)
tree800f3ef02d57a60592cec553e22664831a46465c
parentff52af5fe34b2a32730a6ce85961943146dfc1ba (diff)
downloadxine-lib-2ce81d93218aef7cd8fb362d3e1881237b41b5eb.tar.gz
xine-lib-2ce81d93218aef7cd8fb362d3e1881237b41b5eb.tar.bz2
Instead of declaring op_size, use sizeof(ogg_packet) directly.
-rw-r--r--src/libxinevdec/xine_theora_decoder.c7
1 files 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;