diff options
author | Klaus Schmidinger <vdr@tvdr.de> | 2008-12-13 14:43:22 +0100 |
---|---|---|
committer | Klaus Schmidinger <vdr@tvdr.de> | 2008-12-13 14:43:22 +0100 |
commit | 22feb7bf1cfc0bff0742fd23657de853b63f1890 (patch) | |
tree | b6c7434ae85cdcd507277ea622c2b5d34f0ccc23 /dvbdevice.c | |
parent | 3c7d1a16aca49c647320c0ee67759007fa06a845 (diff) | |
download | vdr-22feb7bf1cfc0bff0742fd23657de853b63f1890.tar.gz vdr-22feb7bf1cfc0bff0742fd23657de853b63f1890.tar.bz2 |
Improved handling PES video packets with zero length when converting from TS to PES
Diffstat (limited to 'dvbdevice.c')
-rw-r--r-- | dvbdevice.c | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/dvbdevice.c b/dvbdevice.c index 18caabd8..e0b05a15 100644 --- a/dvbdevice.c +++ b/dvbdevice.c @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: dvbdevice.c 2.5 2008/12/13 12:22:36 kls Exp $ + * $Id: dvbdevice.c 2.6 2008/12/13 14:38:07 kls Exp $ */ #include "dvbdevice.h" @@ -1266,18 +1266,25 @@ bool cDvbDevice::Flush(int TimeoutMs) int cDvbDevice::PlayVideo(const uchar *Data, int Length) { - return WriteAllOrNothing(fd_video, Data, Length, 1000, 10); + int w; + do { + w = WriteAllOrNothing(fd_video, Data, Length, 1000, 10); + } while (w != Length); + return w; } int cDvbDevice::PlayAudio(const uchar *Data, int Length, uchar Id) { - return WriteAllOrNothing(fd_audio, Data, Length, 1000, 10); + int w; + do { + w = WriteAllOrNothing(fd_audio, Data, Length, 1000, 10); + } while (w != Length); + return w; } int cDvbDevice::PlayTsVideo(const uchar *Data, int Length) { - Length = TsGetPayload(&Data); - return PlayVideo(Data, Length); + return cDevice::PlayTsVideo(Data, Length); } int cDvbDevice::PlayTsAudio(const uchar *Data, int Length) |