Porting buffer fix from Adam's pvt.tvh https://github.com/adamsutton/xbmc-pvr-addons/commit/7f899a13a333b5201f7659668472d7db3d8aaaaa