From 8835a29e07ff51556bc30a26f76394efbe0805fa Mon Sep 17 00:00:00 2001 From: Marten Richter Date: Sun, 14 Oct 2012 17:19:14 +0200 Subject: [PATCH] Minimal fixes in av sync code --- audioomx.cc | 7 +++++-- videoomx.cc | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/audioomx.cc b/audioomx.cc index 98796f1..03ac225 100644 --- a/audioomx.cc +++ b/audioomx.cc @@ -1376,7 +1376,10 @@ UINT AudioOMX::DeliverMediaPacket(MediaPacket packet, const UCHAR* buffer, if (!omx_running) return 0; // if we are not runnig do not do this if (paused) return 0; //Block if we pause - if (packet.synched && packet.presentation_time < 0) { + + //Log::getInstance()->log("Audio", Log::DEBUG, "DeliverMediaPacketOMX time %lld",packet.presentation_time); + + if (packet.synched && packet.presentation_time <= 0) { *samplepos = packet.length; firstsynched = false; Log::getInstance()->log("Audio", Log::DEBUG, @@ -1384,7 +1387,7 @@ UINT AudioOMX::DeliverMediaPacket(MediaPacket packet, const UCHAR* buffer, return packet.length; } - //Log::getInstance()->log("Audio", Log::DEBUG, "DeliverMediaPacketOMX time %lld",packet.presentation_time); + UINT headerstrip = 0; if (packet.disconti) { diff --git a/videoomx.cc b/videoomx.cc index b8b66bd..a250f10 100644 --- a/videoomx.cc +++ b/videoomx.cc @@ -2356,7 +2356,7 @@ UINT VideoOMX::DeliverMediaPacket(MediaPacket packet, if (paused) return 0; //Block if we pause //Log::getInstance()->log("Video", Log::DEBUG, "DeliverMediaPacketOMX time %lld",packet.presentation_time); - if (packet.synched && packet.presentation_time < 0) { + if (packet.synched && packet.presentation_time <= 2000000) { *samplepos = packet.length; firstsynched = false; Log::getInstance()->log("Video", Log::DEBUG, -- 2.39.5