mirror of
https://github.com/VDR4Arch/vdr.git
synced 2023-10-10 13:36:52 +02:00
Fixed handling DVD subtitles in the SPU decoder
This commit is contained in:
parent
04abc3f313
commit
3b89a2a97e
1
HISTORY
1
HISTORY
@ -1532,3 +1532,4 @@ Video Disk Recorder Revision History
|
|||||||
- While learning the remote control keys it is now possible to press the 'Menu'
|
- While learning the remote control keys it is now possible to press the 'Menu'
|
||||||
key to skip the definition of keys that are not available on your particular
|
key to skip the definition of keys that are not available on your particular
|
||||||
RC unit.
|
RC unit.
|
||||||
|
- Fixed handling DVD subtitles in the SPU decoder (thanks to Andreas Schultz).
|
||||||
|
10
dvbspu.c
10
dvbspu.c
@ -8,7 +8,7 @@
|
|||||||
*
|
*
|
||||||
* parts of this file are derived from the OMS program.
|
* parts of this file are derived from the OMS program.
|
||||||
*
|
*
|
||||||
* $Id: dvbspu.c 1.1 2002/09/08 14:17:35 kls Exp $
|
* $Id: dvbspu.c 1.2 2002/09/29 13:48:39 kls Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
@ -138,8 +138,8 @@ bool cDvbSpuBitmap::getMinSize(const aDvbSpuPalDescr paldescr,
|
|||||||
setMin(size.y1, minsize[i].y1);
|
setMin(size.y1, minsize[i].y1);
|
||||||
setMax(size.x2, minsize[i].x2);
|
setMax(size.x2, minsize[i].x2);
|
||||||
setMax(size.y2, minsize[i].y2);
|
setMax(size.y2, minsize[i].y2);
|
||||||
ret = true;
|
|
||||||
}
|
}
|
||||||
|
ret = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (ret)
|
if (ret)
|
||||||
@ -248,6 +248,7 @@ void cDvbSpuDecoder::processSPU(uint32_t pts, uint8_t * buf)
|
|||||||
spubmp = NULL;
|
spubmp = NULL;
|
||||||
delete[]spu;
|
delete[]spu;
|
||||||
spu = buf;
|
spu = buf;
|
||||||
|
spupts = pts;
|
||||||
|
|
||||||
DCSQ_offset = cmdOffs();
|
DCSQ_offset = cmdOffs();
|
||||||
prev_DCSQ_offset = 0;
|
prev_DCSQ_offset = 0;
|
||||||
@ -402,7 +403,7 @@ int cDvbSpuDecoder::setTime(uint32_t pts)
|
|||||||
int i = DCSQ_offset;
|
int i = DCSQ_offset;
|
||||||
state = spNONE;
|
state = spNONE;
|
||||||
|
|
||||||
uint32_t exec_time = pts + spuU32(i) * 1024;
|
uint32_t exec_time = spupts + spuU32(i) * 1024;
|
||||||
if ((pts != 0) && (exec_time > pts))
|
if ((pts != 0) && (exec_time > pts))
|
||||||
return 0;
|
return 0;
|
||||||
DEBUG("offs = %d, rel = %d, time = %d, pts = %d, diff = %d\n",
|
DEBUG("offs = %d, rel = %d, time = %d, pts = %d, diff = %d\n",
|
||||||
@ -416,7 +417,8 @@ int cDvbSpuDecoder::setTime(uint32_t pts)
|
|||||||
|
|
||||||
prev_DCSQ_offset = DCSQ_offset;
|
prev_DCSQ_offset = DCSQ_offset;
|
||||||
DCSQ_offset = spuU32(i);
|
DCSQ_offset = spuU32(i);
|
||||||
DEBUG("offs = %d, DCSQ = %d\n", i, DCSQ_offset);
|
DEBUG("offs = %d, DCSQ = %d, prev_DCSQ = %d\n",
|
||||||
|
i, DCSQ_offset, prev_DCSQ_offset);
|
||||||
i += 2;
|
i += 2;
|
||||||
|
|
||||||
while (spu[i] != CMD_SPU_EOF) { // Command Sequence
|
while (spu[i] != CMD_SPU_EOF) { // Command Sequence
|
||||||
|
3
dvbspu.h
3
dvbspu.h
@ -8,7 +8,7 @@
|
|||||||
*
|
*
|
||||||
* parts of this file are derived from the OMS program.
|
* parts of this file are derived from the OMS program.
|
||||||
*
|
*
|
||||||
* $Id: dvbspu.h 1.1 2002/09/08 14:17:38 kls Exp $
|
* $Id: dvbspu.h 1.2 2002/09/29 13:49:01 kls Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef __DVBSPU_H
|
#ifndef __DVBSPU_H
|
||||||
@ -95,6 +95,7 @@ class cDvbSpuDecoder:public cSpuDecoder {
|
|||||||
|
|
||||||
// processing state
|
// processing state
|
||||||
uint8_t *spu;
|
uint8_t *spu;
|
||||||
|
uint32_t spupts;
|
||||||
bool clean;
|
bool clean;
|
||||||
bool ready;
|
bool ready;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user