From 3bc8b0963819194d60f6ab4a47604c1abaf2e5c8 Mon Sep 17 00:00:00 2001 From: martii Date: Sun, 28 Jul 2013 10:12:36 +0200 Subject: [PATCH] libeplayer3/pcm: cleanup --- libeplayer3/output/writer/pcm.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/libeplayer3/output/writer/pcm.c b/libeplayer3/output/writer/pcm.c index ae228f3..f3dde4f 100644 --- a/libeplayer3/output/writer/pcm.c +++ b/libeplayer3/output/writer/pcm.c @@ -97,9 +97,7 @@ static const unsigned char clpcm_prv[14] = { 0xA0, //sub_stream_id 0, 0 //resvd for copyright management }; -static unsigned char lpcm_pes[18]; static unsigned char lpcm_prv[14]; - static unsigned char breakBuffer[8192]; static unsigned int breakBufferFillSize = 0; @@ -194,7 +192,7 @@ static int writeData(void* _call) pcm_printf(10, "AudioPts %lld\n", call->Pts); - if ((call->data == NULL) || (call->len <= 0)) { + if (!call->data || (call->len <= 0)) { pcm_err("parsing NULL Data. ignoring...\n"); return 0; } @@ -278,11 +276,10 @@ static int writeData(void* _call) } } - //increment err... subframe count? lpcm_prv[1] = ((lpcm_prv[1]+SubFramesPerPES) & 0x1F); - iov[0].iov_len = InsertPesHeader (PesHeader, iov[1].iov_len + iov[2].iov_len, 0xBD, call->Pts, 0); + iov[0].iov_len = InsertPesHeader (PesHeader, iov[1].iov_len + iov[2].iov_len, PCM_PES_START_CODE, call->Pts, 0); int len = writev(call->fd, iov, 3); if (len < 0) break;