Project "Tuxbox-GIT: apps": The branch, master has been updated via f40104ddf98ecec4d2915fa498460755035df921 (commit) from f9ae6bced89a6c856507141072ae4e9700ab14c5 (commit)
Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit f40104ddf98ecec4d2915fa498460755035df921 Author: Christian Schuett <gaucho...@hotmail.com> Date: Thu Aug 8 19:39:42 2013 +0200 Neutrino: fix PSI generation * only transfer PIDs if 'Insert PSI in TS' is enabled to avoid a buffer overflow in the APID array after some recordings * reset PIDs before recording and not after patching the TS-file to avoid PSI with PIDs == 0 if splitsize != 0 Signed-off-by: Christian Schuett <gaucho...@hotmail.com> diff --git a/tuxbox/neutrino/src/driver/genpsi.c b/tuxbox/neutrino/src/driver/genpsi.c index 475eade..8e91fdd 100644 --- a/tuxbox/neutrino/src/driver/genpsi.c +++ b/tuxbox/neutrino/src/driver/genpsi.c @@ -69,6 +69,13 @@ void transfer_pids(uint16_t pid,uint16_t pidart,short isAC3) break; } } +void reset_pids(void) +{ + avPids.pcrpid = 0; + avPids.vpid = 0; + avPids.nba = 0; +} + //-- special enigma stream description packet for -- //-- at least 1 video, 1 audo and 1 PCR-Pid stream -- //------------------------------------------------------------------------------------ @@ -204,9 +211,6 @@ int genpsi(int fd2) calc_crc32psi(&pkt[data_len], &pkt[OFS_HDR_2], data_len-OFS_HDR_2 ); //-- write TS packet -- bytes += write(fd2, pkt, SIZE_TS_PKT); -//-- finish -- - avPids.pcrpid=0; - avPids.vpid=0; - avPids.nba=0; + return 1; } diff --git a/tuxbox/neutrino/src/driver/genpsi.h b/tuxbox/neutrino/src/driver/genpsi.h index 91bf58e..7b2ae0b 100644 --- a/tuxbox/neutrino/src/driver/genpsi.h +++ b/tuxbox/neutrino/src/driver/genpsi.h @@ -33,5 +33,6 @@ $Id: genpsi.h,v 1.1 2005/08/15 14:47:52 metallica Exp $ int genpsi(int fd2); void transfer_pids(uint16_t pid,uint16_t pidart,short isAC3); +void reset_pids(void); #endif diff --git a/tuxbox/neutrino/src/driver/vcrcontrol.cpp b/tuxbox/neutrino/src/driver/vcrcontrol.cpp index 0ef635e..927949c 100644 --- a/tuxbox/neutrino/src/driver/vcrcontrol.cpp +++ b/tuxbox/neutrino/src/driver/vcrcontrol.cpp @@ -718,8 +718,8 @@ bool CVCRControl::CFileDevice::Record(const t_channel_id channel_id, int mode, c CutBackNeutrino(channel_id, mode); - int repeatcount=0; #ifdef HAVE_DBOX_HARDWARE + int repeatcount=0; int actmode=g_Zapit->PlaybackState(); // get actual decoder mode bool sptsmode=g_settings.misc_spts; // take default from settings @@ -756,18 +756,20 @@ bool CVCRControl::CFileDevice::Record(const t_channel_id channel_id, int mode, c unsigned int pos; CZapitClient::CCurrentServiceInfo si = g_Zapit->getCurrentServiceInfo(); + if (GenPsi && sptsmode) + reset_pids(); if (si.vpid != 0) { pids[0] = si.vpid; numpids = 1; - if(sptsmode) + if (GenPsi && sptsmode) transfer_pids(si.vpid, EN_TYPE_VIDEO, 0); if (si.pcrpid != si.vpid) { pids[1] = si.pcrpid; numpids = 2; - if(sptsmode) + if (GenPsi && sptsmode) transfer_pids(si.pcrpid, EN_TYPE_PCR, 0); } } @@ -781,7 +783,7 @@ bool CVCRControl::CFileDevice::Record(const t_channel_id channel_id, int mode, c for(APIDList::iterator it = apid_list.begin(); it != apid_list.end(); ++it) { pids[numpids++] = it->apid; - if(sptsmode) + if (GenPsi && sptsmode) transfer_pids(it->apid, EN_TYPE_AUDIO, it->ac3 ? 1 : 0); } if(!apid_list.empty()) @@ -1109,8 +1111,8 @@ bool CVCRControl::CServerDevice::Record(const t_channel_id channel_id, int mode, CutBackNeutrino(channel_id, mode); - int repeatcount=0; #ifdef HAVE_DBOX_HARDWARE + int repeatcount=0; int actmode=g_Zapit->PlaybackState() ; // get actual decoder mode // aviaEXT is loaded, actual mode is not SPTS and switchoption is set , only in tvmode ----------------------------------------------------------------------- Summary of changes: tuxbox/neutrino/src/driver/genpsi.c | 12 ++++++++---- tuxbox/neutrino/src/driver/genpsi.h | 1 + tuxbox/neutrino/src/driver/vcrcontrol.cpp | 12 +++++++----- 3 files changed, 16 insertions(+), 9 deletions(-) -- Tuxbox-GIT: apps ------------------------------------------------------------------------------ Get 100% visibility into Java/.NET code with AppDynamics Lite! It's a free troubleshooting tool designed for production. Get down to code-level detail for bottlenecks, with <2% overhead. Download for free and get started troubleshooting in minutes. http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk _______________________________________________ Tuxbox-cvs-commits mailing list Tuxbox-cvs-commits@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/tuxbox-cvs-commits