Changeset 068443958da89044c1a9b30beef42afc0ec9542a

Show
Ignore:
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
  • modules/codec/subsdec.c

    rdcfaf06 r0684439  
    372372 
    373373    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 ); 
    377377 
    378378    free( psz_subtitle ); 
  • modules/demux/mkv.cpp

    rd9fa61b r0684439  
    15331533        if( tk.fmt.i_cat == SPU_ES && strcmp( tk.psz_codec, "S_VOBSUB" ) ) 
    15341534        { 
    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; 
    15431536        } 
    15441537        es_out_Send( p_demux->out, tk.p_es, p_block ); 
  • modules/demux/ogg.c

    r26e9ba8 r0684439  
    328328                    else 
    329329                    { 
    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 ); 
    331332                    } 
    332333                    continue; 
     
    395396 
    396397        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 ); 
    400400    } 
    401401} 
     
    465465            p_stream->i_interpolated_pcr += (I64C(1000000) / p_stream->f_rate); 
    466466        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 ); 
    469470    } 
    470471} 
     
    616617                /* Set correct starting date in header packets */ 
    617618                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); 
    619621 
    620622                Ogg_DecodePacket( p_demux, p_stream, 
     
    639641 
    640642                /* 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 ); 
    642645            } 
    643646 
     
    691694    else if( p_stream->fmt.i_cat == SPU_ES ) 
    692695    { 
    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; 
    695698    } 
    696699    else if( p_stream->fmt.i_codec == VLC_FOURCC( 't','h','e','o' ) ) 
     
    732735                  p_oggpacket->packet[i_header_len + 1] != '\r' ) ) 
    733736            { 
    734                 p_block->i_dts = p_block->i_pts + (mtime_t)lenbytes * 1000; 
     737                p_block->i_length = (mtime_t)lenbytes * 1000; 
    735738            } 
    736739        } 
  • modules/demux/util/sub.c

    rd6f72ea r0684439  
    567567 
    568568            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
    570570            if( p_sub->subtitle[p_sub->i_subtitle].i_stop > 0 ) 
    571571            { 
    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 ); 
    577578            if( p_block->i_pts > 0 ) 
    578579            { 
     
    13301331        if( p_demux->p_es && i_spu == 0 ) 
    13311332        { 
    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; 
    13341335            es_out_Send( p_demux->p_input->p_es_out, p_demux->p_es, p_pkt ); 
    13351336