diff options
author | Petri Hintukainen <phintuka@users.sourceforge.net> | 2011-11-23 11:36:53 +0200 |
---|---|---|
committer | Petri Hintukainen <phintuka@users.sourceforge.net> | 2011-11-23 11:36:53 +0200 |
commit | 20aa0d9e88c88276e121f7ef17e1d0721efa0999 (patch) | |
tree | e9586303e0d42d3d5abfcac2905f05453504ed49 | |
parent | f8f3dd176e80b0d58bdfcee3b7a08c3a7ff9735b (diff) | |
download | xine-lib-20aa0d9e88c88276e121f7ef17e1d0721efa0999.tar.gz xine-lib-20aa0d9e88c88276e121f7ef17e1d0721efa0999.tar.bz2 |
Simplify
-rw-r--r-- | src/libspudvb/xine_spudvb_decoder.c | 29 |
1 files changed, 15 insertions, 14 deletions
diff --git a/src/libspudvb/xine_spudvb_decoder.c b/src/libspudvb/xine_spudvb_decoder.c index f3ad9888c..8d581a23e 100644 --- a/src/libspudvb/xine_spudvb_decoder.c +++ b/src/libspudvb/xine_spudvb_decoder.c @@ -753,24 +753,25 @@ static void spudec_decode_data (spu_decoder_t * this_gen, buf_element_t * buf) } return; } - else { - if (buf->decoder_info[2]) { - memset (this->pes_pkt, 0xff, 64*1024); - this->pes_pkt_wrptr = this->pes_pkt; - this->pes_pkt_size = buf->decoder_info[2]; - xine_fast_memcpy (this->pes_pkt, buf->content, buf->size); - this->pes_pkt_wrptr += buf->size; + /* accumulate data */ + if (buf->decoder_info[2]) { + memset (this->pes_pkt, 0xff, 64*1024); + this->pes_pkt_wrptr = this->pes_pkt; + this->pes_pkt_size = buf->decoder_info[2]; - this->vpts = 0; - } - else { - if (this->pes_pkt && (this->pes_pkt_wrptr != this->pes_pkt)) { - xine_fast_memcpy (this->pes_pkt_wrptr, buf->content, buf->size); - this->pes_pkt_wrptr += buf->size; - } + xine_fast_memcpy (this->pes_pkt, buf->content, buf->size); + this->pes_pkt_wrptr += buf->size; + + this->vpts = 0; + } + else { + if (this->pes_pkt && (this->pes_pkt_wrptr != this->pes_pkt)) { + xine_fast_memcpy (this->pes_pkt_wrptr, buf->content, buf->size); + this->pes_pkt_wrptr += buf->size; } } + /* don't ask metronom for a vpts but rather do the calculation * because buf->pts could be too far in future and metronom won't accept * further backwards pts (see metronom_got_spu_packet) */ |