Mercurial > mplayer.hg
comparison spudec.c @ 3744:d358f4a74690
dvd seeking -> subtitle disappearing bugs fixed
author | arpi |
---|---|
date | Tue, 25 Dec 2001 20:32:02 +0000 |
parents | ba98028ddc27 |
children | 8f7fab2e89bf |
comparison
equal
deleted
inserted
replaced
3743:38ee592422aa | 3744:d358f4a74690 |
---|---|
282 memcpy(spu->packet, packet, len); | 282 memcpy(spu->packet, packet, len); |
283 spu->packet_offset = len; | 283 spu->packet_offset = len; |
284 } | 284 } |
285 } else { | 285 } else { |
286 // Continue current fragment | 286 // Continue current fragment |
287 if (spu->packet_size < spu->packet_offset + len) | 287 if (spu->packet_size < spu->packet_offset + len){ |
288 fprintf(stderr,"invalid fragment\n"); | 288 fprintf(stderr,"invalid fragment\n"); |
289 else { | 289 spu->packet_size = spu->packet_offset = 0; |
290 } else { | |
290 memcpy(spu->packet + spu->packet_offset, packet, len); | 291 memcpy(spu->packet + spu->packet_offset, packet, len); |
291 spu->packet_offset += len; | 292 spu->packet_offset += len; |
292 } | 293 } |
293 } | 294 } |
294 if (spu->packet_offset == spu->packet_size) { | 295 if (spu->packet_offset == spu->packet_size) { |
295 spudec_decode(spu); | 296 spudec_decode(spu); |
296 spu->packet_offset = 0; | 297 spu->packet_offset = 0; |
297 } | 298 } |
299 } | |
300 | |
301 void spudec_reset(void *this) // called after seek | |
302 { | |
303 spudec_handle_t *spu = (spudec_handle_t*)this; | |
304 spu->now_pts = -1; | |
305 spu->packet_size = spu->packet_offset = 0; | |
298 } | 306 } |
299 | 307 |
300 void spudec_heartbeat(void *this, int pts100) | 308 void spudec_heartbeat(void *this, int pts100) |
301 { | 309 { |
302 ((spudec_handle_t *)this)->now_pts = pts100; | 310 ((spudec_handle_t *)this)->now_pts = pts100; |