mirror of
https://github.com/VDR4Arch/vdr.git
synced 2023-10-10 13:36:52 +02:00
Bugfix in stripping audio packets
This commit is contained in:
parent
d17452dcfa
commit
7caf38b527
7
dvbapi.c
7
dvbapi.c
@ -4,7 +4,7 @@
|
|||||||
* See the main source file 'vdr.c' for copyright information and
|
* See the main source file 'vdr.c' for copyright information and
|
||||||
* how to reach the author.
|
* how to reach the author.
|
||||||
*
|
*
|
||||||
* $Id: dvbapi.c 1.74 2001/06/15 14:11:21 kls Exp $
|
* $Id: dvbapi.c 1.75 2001/06/16 09:43:03 kls Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "dvbapi.h"
|
#include "dvbapi.h"
|
||||||
@ -797,13 +797,16 @@ void cReplayBuffer::StripAudioPackets(uchar *b, int Length, uchar Except)
|
|||||||
uchar c = b[i + 3];
|
uchar c = b[i + 3];
|
||||||
switch (c) {
|
switch (c) {
|
||||||
case 0xC0 ... 0xDF: // audio
|
case 0xC0 ... 0xDF: // audio
|
||||||
|
{
|
||||||
|
int n = b[i + 4] * 256 + b[i + 5];
|
||||||
if (c == 0xC1)
|
if (c == 0xC1)
|
||||||
canToggleAudioTrack = true;
|
canToggleAudioTrack = true;
|
||||||
if (!Except || c != Except) {
|
if (!Except || c != Except) {
|
||||||
int n = b[i + 4] * 256 + b[i + 5];
|
|
||||||
for (int j = i; j < Length && n--; j++)
|
for (int j = i; j < Length && n--; j++)
|
||||||
b[j] = 0x00;
|
b[j] = 0x00;
|
||||||
}
|
}
|
||||||
|
i += n;
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case 0xE0 ... 0xEF: // video
|
case 0xE0 ... 0xEF: // video
|
||||||
i += b[i + 4] * 256 + b[i + 5];
|
i += b[i + 4] * 256 + b[i + 5];
|
||||||
|
Loading…
Reference in New Issue
Block a user