mirror of
https://github.com/VDR4Arch/vdr.git
synced 2023-10-10 13:36:52 +02:00
Fixed cDevice::PlayTsVideo() and cDevice::PlayTsAudio() in case only part of the buffer has been accepted by the device (cont'd)
This commit is contained in:
parent
fbc3a77d60
commit
99468a776d
10
device.c
10
device.c
@ -4,7 +4,7 @@
|
||||
* See the main source file 'vdr.c' for copyright information and
|
||||
* how to reach the author.
|
||||
*
|
||||
* $Id: device.c 2.24 2009/06/21 13:26:06 kls Exp $
|
||||
* $Id: device.c 2.25 2009/08/16 10:54:36 kls Exp $
|
||||
*/
|
||||
|
||||
#include "device.h"
|
||||
@ -1293,11 +1293,11 @@ int cDevice::PlayTsVideo(const uchar *Data, int Length)
|
||||
int l;
|
||||
while (const uchar *p = tsToPesVideo.GetPes(l)) {
|
||||
int w = PlayVideo(p, l);
|
||||
if (w == 0)
|
||||
if (w <= 0) {
|
||||
tsToPesVideo.SetRepeatLast();
|
||||
if (w <= 0)
|
||||
return w;
|
||||
}
|
||||
}
|
||||
tsToPesVideo.Reset();
|
||||
}
|
||||
tsToPesVideo.PutTs(Data, Length);
|
||||
@ -1310,10 +1310,10 @@ int cDevice::PlayTsAudio(const uchar *Data, int Length)
|
||||
int l;
|
||||
if (const uchar *p = tsToPesAudio.GetPes(l)) {
|
||||
int w = PlayAudio(p, l, 0);
|
||||
if (w == 0)
|
||||
if (w <= 0) {
|
||||
tsToPesAudio.SetRepeatLast();
|
||||
if (w <= 0)
|
||||
return w;
|
||||
}
|
||||
tsToPesAudio.Reset();
|
||||
}
|
||||
tsToPesAudio.PutTs(Data, Length);
|
||||
|
Loading…
Reference in New Issue
Block a user