comparison sub/spudec.c @ 37161:6d654ac9201e

Better handling of out-of-range subtitle timestamps. Fixes decoding of PGS subtitles.
author reimar
date Sat, 23 Aug 2014 14:23:37 +0000
parents 18428293fb7f
children cad608ae7295
comparison
equal deleted inserted replaced
37160:bb15cab6c059 37161:6d654ac9201e
1424 1424
1425 void spudec_packet_send(void *spu, packet_t *packet, double pts, double endpts) 1425 void spudec_packet_send(void *spu, packet_t *packet, double pts, double endpts)
1426 { 1426 {
1427 packet->start_pts = 0; 1427 packet->start_pts = 0;
1428 packet->end_pts = 0x7fffffff; 1428 packet->end_pts = 0x7fffffff;
1429 if (pts != MP_NOPTS_VALUE) 1429 if (pts != MP_NOPTS_VALUE && pts < 0xffffffffu / 90000)
1430 packet->start_pts = pts * 90000; 1430 packet->start_pts = pts * 90000;
1431 if (endpts != MP_NOPTS_VALUE) 1431 if (endpts != MP_NOPTS_VALUE && endpts < 0xffffffffu / 90000)
1432 packet->end_pts = endpts * 90000; 1432 packet->end_pts = endpts * 90000;
1433 spudec_queue_packet(spu, packet); 1433 spudec_queue_packet(spu, packet);
1434 } 1434 }
1435 1435
1436 /** 1436 /**