diff options
author | scop <scop> | 2005-05-28 10:40:00 +0000 |
---|---|---|
committer | scop <scop> | 2005-05-28 10:40:00 +0000 |
commit | f8210be1af80d0a7ef27a5408a71a055216d1b7a (patch) | |
tree | a560a638da445fc0ffc7cc7795d14d96dff5f73d /dxr3demuxdevice.c | |
parent | 21050a9fd6ec17093a3c8aa308912eba0dedaabb (diff) | |
download | vdr-plugin-dxr3-f8210be1af80d0a7ef27a5408a71a055216d1b7a.tar.gz vdr-plugin-dxr3-f8210be1af80d0a7ef27a5408a71a055216d1b7a.tar.bz2 |
Improve recovery and avoid lockups with bad streams (Jon Burgess).
Diffstat (limited to 'dxr3demuxdevice.c')
-rw-r--r-- | dxr3demuxdevice.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/dxr3demuxdevice.c b/dxr3demuxdevice.c index 6dc7292..6523768 100644 --- a/dxr3demuxdevice.c +++ b/dxr3demuxdevice.c @@ -388,6 +388,9 @@ int cDxr3DemuxDevice::DemuxPes(const uint8_t* buf, int length, bool bAc3Dts) m_dxr3Device.SetVerticalSize(pesFrame.GetVerticalSize()); while (!Poll(100)); cFixedLengthFrame* pTempFrame = m_vBuf.Push(pesFrame.GetEsStart(), (int) (pesFrame.GetEsLength()), pts, ftVideo); + if (!pTempFrame) /* Push Timeout */ + throw (cDxr3PesFrame::PES_GENERAL_ERROR); + pTempFrame->SetAspectRatio(pesFrame.GetAspectRatio()); m_aBuf.WakeUp(); @@ -414,6 +417,9 @@ int cDxr3DemuxDevice::DemuxPes(const uint8_t* buf, int length, bool bAc3Dts) m_dxr3Device.SetHorizontalSize(pesFrame.GetHorizontalSize()); m_dxr3Device.SetVerticalSize(pesFrame.GetVerticalSize()); cFixedLengthFrame* pTempFrame = m_vBuf.Push(pesFrame.GetEsStart(), (int) (pesFrame.GetEsLength()), pts, ftVideo); + if (!pTempFrame) /* Push Timeout */ + throw (cDxr3PesFrame::PES_GENERAL_ERROR); + pTempFrame->SetAspectRatio(pesFrame.GetAspectRatio()); if (m_synchState == DXR3_DEMUX_AUDIO_SYNCHED) |