Changeset e79dec9998d8c9520b276798f366d50fcaceb7e6

Show
Ignore:
Timestamp:
02/08/04 17:48:11 (5 years ago)
Author:
Gildas Bazin <gbazin@videolan.org>
git-committer:
Gildas Bazin <gbazin@videolan.org> 1076258891 +0000
git-parent:

[ce491a51b8aa8b98fa77637aaf8baa839cc10625]

git-author:
Gildas Bazin <gbazin@videolan.org> 1076258891 +0000
Message:

* modules/demux/dts.c: more fixes.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • modules/demux/dts.c

    r7db8bcc re79dec9  
    33 ***************************************************************************** 
    44 * Copyright (C) 2001 VideoLAN 
    5  * $Id: dts.c,v 1.6 2004/02/06 15:11:39 hartman Exp $ 
     5 * $Id: dts.c,v 1.7 2004/02/08 16:48:11 gbazin Exp $ 
    66 * 
    77 * Authors: Gildas Bazin <gbazin@netcourrier.com> 
     
    122122            i_peek += GetDWLE( p_peek + i_peek - 4 ) + 8; 
    123123        } 
    124   
     124 
    125125        /* TODO: should check wave format and sample_rate */ 
    126126 
    127127        /* Some DTS wav files don't begin with a sync code so we do a more 
    128128         * extensive search */ 
    129         if( input_Peek( p_input, &p_peek, i_peek + DTS_PACKET_SIZE ) == 
    130             i_peek + DTS_PACKET_SIZE
    131         { 
    132             int i_size = i_peek + DTS_PACKET_SIZE - DTS_MAX_HEADER_SIZE; 
     129        if( input_Peek( p_input, &p_peek, i_peek + DTS_PACKET_SIZE * 2) == 
     130            i_peek + DTS_PACKET_SIZE * 2
     131        { 
     132            int i_size = i_peek + DTS_PACKET_SIZE * 2 - DTS_MAX_HEADER_SIZE; 
    133133 
    134134            while( i_peek < i_size ) 
     
    144144 
    145145    /* Have a peep at the show. */ 
    146     if( input_Peek( p_input, &p_peek, i_peek + DTS_MAX_HEADER_SIZE ) < 
    147         i_peek + DTS_MAX_HEADER_SIZE
     146    if( input_Peek( p_input, &p_peek, i_peek + DTS_MAX_HEADER_SIZE * 2 ) < 
     147        i_peek + DTS_MAX_HEADER_SIZE * 2
    148148    { 
    149149        /* Stream too short */ 
     
    241241 
    242242    if( p_sys->b_start ) 
    243     { 
    244243        p_block_in->i_pts = p_block_in->i_dts = 1; 
    245         p_sys->b_start = VLC_FALSE; 
    246     } 
    247244    else 
    248     { 
    249245        p_block_in->i_pts = p_block_in->i_dts = 0; 
    250     } 
    251246 
    252247    while( (p_block_out = p_sys->p_packetizer->pf_packetize( 
    253248                p_sys->p_packetizer, &p_block_in )) ) 
    254249    { 
     250        p_sys->b_start = VLC_FALSE; 
     251 
    255252        while( p_block_out ) 
    256253        {