summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tools/backgroundwriter.c9
-rw-r--r--tools/udp_pes_scheduler.c6
2 files changed, 9 insertions, 6 deletions
diff --git a/tools/backgroundwriter.c b/tools/backgroundwriter.c
index f88f2c7e..f13a52a7 100644
--- a/tools/backgroundwriter.c
+++ b/tools/backgroundwriter.c
@@ -4,10 +4,14 @@
* See the main source file 'xineliboutput.c' for copyright information and
* how to reach the author.
*
- * $Id: backgroundwriter.c,v 1.5 2007-03-27 07:59:53 phintuka Exp $
+ * $Id: backgroundwriter.c,v 1.6 2008-02-04 23:54:06 phintuka Exp $
*
*/
+#define __STDC_FORMAT_MACROS
+#define __STDC_CONSTANT_MACROS
+#include <inttypes.h>
+
#include <stdint.h>
#include <unistd.h>
#include <netinet/tcp.h> // CORK, NODELAY
@@ -329,8 +333,7 @@ void cRawWriter::Action(void)
if(GetPos == NextHeaderPos) {
if(Count < 6)
LOGMSG("cBackgroundWriter @NextHeaderPos: Count < header size !");
- bool dummy;
- int packlen = pes_packet_len(Data, Count, dummy);
+ int packlen = pes_packet_len(Data, Count);
if(Count < packlen)
;//LOGMSG("Count = %d < %d", Count,
// header->len + sizeof(stream_tcp_header_t));
diff --git a/tools/udp_pes_scheduler.c b/tools/udp_pes_scheduler.c
index c085f1b6..519453bb 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.32 2007-06-21 09:08:59 phintuka Exp $
+ * $Id: udp_pes_scheduler.c,v 1.33 2008-02-04 23:55:49 phintuka Exp $
*
*/
@@ -583,8 +583,8 @@ void cUdpScheduler::Send_SAP(bool Announce)
void cUdpScheduler::Schedule(const uchar *Data, int Length)
{
- bool Audio=false, Video=false;
- int64_t pts = pes_extract_pts(Data, Length, Audio, Video);
+ bool Audio = IS_AUDIO_PACKET(Data), Video = IS_VIDEO_PACKET(Data);
+ int64_t pts = PES_HAS_PTS(Data) ? pes_get_pts(Data, Length) : INT64_C(-1);
int elapsed = pts>0 ? calc_elapsed_vtime(pts, Audio) : 0;
if(elapsed > 0) {