diff options
| author | phintuka <phintuka> | 2006-06-11 21:02:54 +0000 |
|---|---|---|
| committer | phintuka <phintuka> | 2006-06-11 21:02:54 +0000 |
| commit | da5d45a5bc4eb1f591d6e1bbb258e2ef3877bf20 (patch) | |
| tree | d2da95ff82b27cdc05bba7ad57f287826bd8a406 /tools | |
| parent | cf30b0929c1e1c5b40e759d759a6eb40e74d50b5 (diff) | |
| download | xineliboutput-da5d45a5bc4eb1f591d6e1bbb258e2ef3877bf20.tar.gz xineliboutput-da5d45a5bc4eb1f591d6e1bbb258e2ef3877bf20.tar.bz2 | |
Flush (UDP) fixed
Diffstat (limited to 'tools')
| -rw-r--r-- | tools/udp_pes_scheduler.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/tools/udp_pes_scheduler.c b/tools/udp_pes_scheduler.c index b9a929fe..d44d3c38 100644 --- a/tools/udp_pes_scheduler.c +++ b/tools/udp_pes_scheduler.c @@ -4,7 +4,7 @@ * See the main source file 'xineliboutput.c' for copyright information and * how to reach the author. * - * $Id: udp_pes_scheduler.c,v 1.4 2006-06-11 19:08:05 phintuka Exp $ + * $Id: udp_pes_scheduler.c,v 1.5 2006-06-11 21:02:54 phintuka Exp $ * */ @@ -220,8 +220,8 @@ void cUdpScheduler::Clear(void) cMutexLock ml(&m_Lock); m_BackLog->Clear(m_QueuePending); + m_QueuePending = 0; - m_Cond.Broadcast(); } @@ -414,9 +414,11 @@ void cUdpScheduler::Action(void) static unsigned char padding[] = {0x00,0x00,0x01,0xBE,0x00,0x02,0xff,0xff}; int prevseq = (m_QueueNextSeq + UDP_BUFFER_SIZE - 1) & UDP_BUFFER_MASK; stream_udp_header_t *frame = m_BackLog->Get(prevseq); - if(frame) - m_BackLog->MakeFrame(ntohll(frame->pos), padding, 8); - else + if(frame) { + int prevlen = m_BackLog->PayloadSize(prevseq); + uint64_t pos = ntohll(frame->pos) + prevlen - 8; + m_BackLog->MakeFrame(pos, padding, 8); + } else m_BackLog->MakeFrame(0, padding, 8); m_QueuePending++; } |
