1
0
mirror of https://github.com/VDR4Arch/vdr.git synced 2023-10-10 13:36:52 +02:00

Only waiting for data if there actually is a DPid

This commit is contained in:
Klaus Schmidinger 2005-01-06 16:23:11 +01:00
parent 05bd062f79
commit cb696731e6
2 changed files with 5 additions and 4 deletions

View File

@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
* $Id: transfer.c 1.20 2004/12/27 11:08:34 kls Exp $
* $Id: transfer.c 1.21 2005/01/06 16:23:11 kls Exp $
*/
#include "transfer.h"
@ -20,6 +20,7 @@ cTransfer::cTransfer(int VPid, int APid1, int APid2, int DPid1, int DPid2)
{
ringBuffer = new cRingBufferLinear(TRANSFERBUFSIZE, TS_SIZE * 2, true, "Transfer");
remux = new cRemux(VPid, APid1, APid2, DPid1, DPid2);
hasDolby = VPid != 0 && DPid1 != 0;
active = false;
}
@ -66,8 +67,7 @@ void cTransfer::Action(void)
active = true;
while (active) {
#ifdef FW_NEEDS_BUFFER_RESERVE_FOR_AC3
#define HasDolby true
if (HasDolby) {
if (hasDolby) {
if (IsAttached() && !Cleared) {
PlayPes(NULL, 0);
Cleared = true;

View File

@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
* $Id: transfer.h 1.6 2004/11/28 11:51:37 kls Exp $
* $Id: transfer.h 1.7 2005/01/06 16:23:00 kls Exp $
*/
#ifndef __TRANSFER_H
@ -20,6 +20,7 @@ class cTransfer : public cReceiver, public cPlayer, public cThread {
private:
cRingBufferLinear *ringBuffer;
cRemux *remux;
bool hasDolby;
bool active;
protected:
virtual void Activate(bool On);