[FFmpeg-soc] [soc]: r4628 - spdif/spdif.c

bwolowiec subversion at mplayerhq.hu
Mon Jul 6 19:46:33 CEST 2009


Author: bwolowiec
Date: Mon Jul  6 19:46:33 2009
New Revision: 4628

Log:
Small corrections

Modified:
   spdif/spdif.c

Modified: spdif/spdif.c
==============================================================================
--- spdif/spdif.c	Mon Jul  6 19:45:13 2009	(r4627)
+++ spdif/spdif.c	Mon Jul  6 19:46:33 2009	(r4628)
@@ -154,7 +154,7 @@ static int spdif_write_packet(struct AVF
     uint16_t *data = (uint16_t *)pkt->data;
     int i;
 
-    ctx->pkt_size = pkt->size << 3;
+    ctx->pkt_size = ((pkt->size+1)>>1)<<4; //TODO simplify?
 
     (*ctx->header_info)(s, pkt);
 
@@ -169,7 +169,7 @@ static int spdif_write_packet(struct AVF
         put_be16(s->pb, data[i]); //XXX be?
 
     if(pkt->size&1)
-        put_be16(s->pb, pkt->data[pkt->size-1]); //XXX be?
+        put_be16(s->pb, (uint8_t)pkt->data[pkt->size-1]); //XXX be?
 
     i=(ctx->pkt_offset - BURST_HEADER_SIZE - pkt->size) >> 1;
     if(i < 0){


More information about the FFmpeg-soc mailing list