From 13d2985ce7ccd412b0a9647623173f9b7c0f86ae Mon Sep 17 00:00:00 2001 From: Marten Richter Date: Sun, 11 Nov 2012 12:00:53 +0100 Subject: [PATCH] Block mediapackets on pause --- audioomx.cc | 2 +- videoomx.cc | 2 +- videoomx.h | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/audioomx.cc b/audioomx.cc index 46b59ed..8947d44 100644 --- a/audioomx.cc +++ b/audioomx.cc @@ -1650,7 +1650,7 @@ 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 (vw->isClockPaused()) return 0; //Block if we pause //Log::getInstance()->log("Audio", Log::DEBUG, "DMP mark 1"); //Log::getInstance()->log("Audio", Log::DEBUG, "DeliverMediaPacketOMX time %lld",packet.presentation_time); diff --git a/videoomx.cc b/videoomx.cc index 2078de4..918b71a 100644 --- a/videoomx.cc +++ b/videoomx.cc @@ -2540,7 +2540,7 @@ UINT VideoOMX::DeliverMediaPacket(MediaPacket packet, if (!omx_running) return 0; // if we are not runnig do not do this - //if (paused) return 0; //Block if we pause + if (isClockPaused()) return 0; //Block if we pause // Log::getInstance()->log("Video", Log::DEBUG, "DMP mark 1"); //Log::getInstance()->log("Video", Log::DEBUG, "DeliverMediaPacketOMX time %lld",packet.presentation_time); diff --git a/videoomx.h b/videoomx.h index 026757a..3a7cb7a 100644 --- a/videoomx.h +++ b/videoomx.h @@ -215,6 +215,7 @@ class VideoOMX : public Video OMX_ERRORTYPE ProtOMXEmptyThisBuffer(OMX_HANDLETYPE handle, OMX_BUFFERHEADERTYPE* buffer); void clockPause(); void clockUnpause(); + bool isClockPaused() {return clockpaused;}; void interlaceSwitch4Demux(); -- 2.39.5