Changeset 068443958da89044c1a9b30beef42afc0ec9542a
- Timestamp:
- 07/04/04 23:13:35
(5 years ago)
- Author:
- Gildas Bazin <gbazin@videolan.org>
- git-committer:
- Gildas Bazin <gbazin@videolan.org> 1081372415 +0000
- git-parent:
[9c615be0e14f7b30f426812746bda452d9e09ffb]
- git-author:
- Gildas Bazin <gbazin@videolan.org> 1081372415 +0000
- Message:
* ALL: use p_block->i_length for text subtitles duration (instead of the i_dts hack).
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| rdcfaf06 |
r0684439 |
|
| 372 | 372 | |
|---|
| 373 | 373 | vout_ShowTextAbsolute( p_vout, psz_subtitle, NULL, |
|---|
| 374 | | OSD_ALIGN_BOTTOM | p_sys->i_align, |
|---|
| 375 | | i_align_h, i_align_v, |
|---|
| 376 | | p_block->i_pts, p_block->i_dts ); |
|---|
| | 374 | OSD_ALIGN_BOTTOM | p_sys->i_align, i_align_h, |
|---|
| | 375 | i_align_v, p_block->i_pts, |
|---|
| | 376 | p_block->i_length ? p_block->i_pts + p_block->i_length : 0 ); |
|---|
| 377 | 377 | |
|---|
| 378 | 378 | free( psz_subtitle ); |
|---|
| rd9fa61b |
r0684439 |
|
| 1533 | 1533 | if( tk.fmt.i_cat == SPU_ES && strcmp( tk.psz_codec, "S_VOBSUB" ) ) |
|---|
| 1534 | 1534 | { |
|---|
| 1535 | | if( i_duration > 0 ) |
|---|
| 1536 | | { |
|---|
| 1537 | | p_block->i_dts += i_duration * 1000; |
|---|
| 1538 | | } |
|---|
| 1539 | | else |
|---|
| 1540 | | { |
|---|
| 1541 | | p_block->i_dts = 0; |
|---|
| 1542 | | } |
|---|
| | 1535 | p_block->i_length = i_duration * 1000; |
|---|
| 1543 | 1536 | } |
|---|
| 1544 | 1537 | es_out_Send( p_demux->out, tk.p_es, p_block ); |
|---|
| r26e9ba8 |
r0684439 |
|
| 328 | 328 | else |
|---|
| 329 | 329 | { |
|---|
| 330 | | es_out_Control( p_demux->out, ES_OUT_SET_PCR, p_stream->i_pcr ); |
|---|
| | 330 | es_out_Control( p_demux->out, ES_OUT_SET_PCR, |
|---|
| | 331 | p_stream->i_pcr ); |
|---|
| 331 | 332 | } |
|---|
| 332 | 333 | continue; |
|---|
| … | … | |
| 395 | 396 | |
|---|
| 396 | 397 | default: |
|---|
| 397 | | return demux2_vaControlHelper( p_demux->s, |
|---|
| 398 | | 0, -1, |
|---|
| 399 | | p_sys->i_bitrate, 1, i_query, args ); |
|---|
| | 398 | return demux2_vaControlHelper( p_demux->s, 0, -1, p_sys->i_bitrate, |
|---|
| | 399 | 1, i_query, args ); |
|---|
| 400 | 400 | } |
|---|
| 401 | 401 | } |
|---|
| … | … | |
| 465 | 465 | p_stream->i_interpolated_pcr += (I64C(1000000) / p_stream->f_rate); |
|---|
| 466 | 466 | else if( p_stream->fmt.i_bitrate ) |
|---|
| 467 | | p_stream->i_interpolated_pcr += ( p_oggpacket->bytes * I64C(1000000) |
|---|
| 468 | | / p_stream->fmt.i_bitrate / 8 ); |
|---|
| | 467 | p_stream->i_interpolated_pcr += |
|---|
| | 468 | ( p_oggpacket->bytes * I64C(1000000) / |
|---|
| | 469 | p_stream->fmt.i_bitrate / 8 ); |
|---|
| 469 | 470 | } |
|---|
| 470 | 471 | } |
|---|
| … | … | |
| 616 | 617 | /* Set correct starting date in header packets */ |
|---|
| 617 | 618 | p_stream->p_packets_backup[i].granulepos = |
|---|
| 618 | | p_stream->i_interpolated_pcr * p_stream->f_rate / I64C(1000000); |
|---|
| | 619 | p_stream->i_interpolated_pcr * p_stream->f_rate / |
|---|
| | 620 | I64C(1000000); |
|---|
| 619 | 621 | |
|---|
| 620 | 622 | Ogg_DecodePacket( p_demux, p_stream, |
|---|
| … | … | |
| 639 | 641 | |
|---|
| 640 | 642 | /* Call the pace control */ |
|---|
| 641 | | es_out_Control( p_demux->out, ES_OUT_SET_PCR, p_stream->i_pcr ); |
|---|
| | 643 | es_out_Control( p_demux->out, ES_OUT_SET_PCR, |
|---|
| | 644 | p_stream->i_pcr ); |
|---|
| 642 | 645 | } |
|---|
| 643 | 646 | |
|---|
| … | … | |
| 691 | 694 | else if( p_stream->fmt.i_cat == SPU_ES ) |
|---|
| 692 | 695 | { |
|---|
| 693 | | p_block->i_pts = i_pts; |
|---|
| 694 | | p_block->i_dts = 0; |
|---|
| | 696 | p_block->i_dts = p_block->i_pts = i_pts; |
|---|
| | 697 | p_block->i_length = 0; |
|---|
| 695 | 698 | } |
|---|
| 696 | 699 | else if( p_stream->fmt.i_codec == VLC_FOURCC( 't','h','e','o' ) ) |
|---|
| … | … | |
| 732 | 735 | p_oggpacket->packet[i_header_len + 1] != '\r' ) ) |
|---|
| 733 | 736 | { |
|---|
| 734 | | p_block->i_dts = p_block->i_pts + (mtime_t)lenbytes * 1000; |
|---|
| | 737 | p_block->i_length = (mtime_t)lenbytes * 1000; |
|---|
| 735 | 738 | } |
|---|
| 736 | 739 | } |
|---|
| rd6f72ea |
r0684439 |
|
| 567 | 567 | |
|---|
| 568 | 568 | p_block->i_pts = p_sub->subtitle[p_sub->i_subtitle].i_start; |
|---|
| 569 | | p_block->i_dts = 0; |
|---|
| | 569 | p_block->i_dts = p_block->i_pts; |
|---|
| 570 | 570 | if( p_sub->subtitle[p_sub->i_subtitle].i_stop > 0 ) |
|---|
| 571 | 571 | { |
|---|
| 572 | | /* FIXME kludge i_dts means end of display... */ |
|---|
| 573 | | p_block->i_dts = p_sub->subtitle[p_sub->i_subtitle].i_stop; |
|---|
| 574 | | } |
|---|
| 575 | | |
|---|
| 576 | | memcpy( p_block->p_buffer, p_sub->subtitle[p_sub->i_subtitle].psz_text, i_len ); |
|---|
| | 572 | p_block->i_length = |
|---|
| | 573 | p_sub->subtitle[p_sub->i_subtitle].i_stop - p_block->i_pts; |
|---|
| | 574 | } |
|---|
| | 575 | |
|---|
| | 576 | memcpy( p_block->p_buffer, |
|---|
| | 577 | p_sub->subtitle[p_sub->i_subtitle].psz_text, i_len ); |
|---|
| 577 | 578 | if( p_block->i_pts > 0 ) |
|---|
| 578 | 579 | { |
|---|
| … | … | |
| 1330 | 1331 | if( p_demux->p_es && i_spu == 0 ) |
|---|
| 1331 | 1332 | { |
|---|
| 1332 | | p_pkt->i_pts = p_bk->i_pts; |
|---|
| 1333 | | p_pkt->i_dts = 0; |
|---|
| | 1333 | p_pkt->i_dts = p_pkt->i_pts = p_bk->i_pts; |
|---|
| | 1334 | p_pkt->i_length = 0; |
|---|
| 1334 | 1335 | es_out_Send( p_demux->p_input->p_es_out, p_demux->p_es, p_pkt ); |
|---|
| 1335 | 1336 | |
|---|