Changeset 02d6bac4129293e33ae12057fd6e418f20d7d771

Show
Ignore:
Timestamp:
27/01/04 15:05:33 (5 years ago)
Author:
Gildas Bazin <gbazin@videolan.org>
git-committer:
Gildas Bazin <gbazin@videolan.org> 1075212333 +0000
git-parent:

[a3aa98472a38b2767b85279d975fd4df97331924]

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

* modules/packetizer/mpegvideo.c: fixed major bug where the first frame could be sent out with a null dts.
* src/stream_output/stream_output.c: guard against non-dated packets in sout_InputSendBuffer().

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • modules/packetizer/mpegvideo.c

    rf7fd8b6 r02d6bac  
    33 ***************************************************************************** 
    44 * Copyright (C) 2001, 2002 VideoLAN 
    5  * $Id: mpegvideo.c,v 1.27 2004/01/25 17:58:30 murray Exp $ 
     5 * $Id: mpegvideo.c,v 1.28 2004/01/27 14:05:33 gbazin Exp $ 
    66 * 
    77 * Authors: Laurent Aimar <fenrir@via.ecp.fr> 
     
    295295            } 
    296296 
     297            /* When starting the stream we can have the first frame with 
     298             * a null DTS (i_interpolated_pts is initialized to 0) */ 
     299            if( !p_pic->i_dts ) p_pic->i_dts = p_pic->i_pts; 
     300 
    297301            /* So p_block doesn't get re-added several times */ 
    298302            *pp_block = block_BytestreamPop( &p_sys->bytestream ); 
  • src/stream_output/stream_output.c

    r5c2cf08 r02d6bac  
    33 ***************************************************************************** 
    44 * Copyright (C) 2002-2004 VideoLAN 
    5  * $Id: stream_output.c,v 1.38 2004/01/23 17:56:14 gbazin Exp $ 
     5 * $Id: stream_output.c,v 1.39 2004/01/27 14:05:33 gbazin Exp $ 
    66 * 
    77 * Authors: Christophe Massiot <massiot@via.ecp.fr> 
     
    238238} 
    239239 
    240  
    241240int sout_InputSendBuffer( sout_packetizer_input_t *p_input, 
    242241                          sout_buffer_t *p_buffer ) 
     
    251250    } 
    252251 
     252    if( !p_buffer->i_dts ) 
     253    { 
     254        msg_Warn( p_sout, "trying to send non-dated packet to stream output!"); 
     255        sout_BufferDelete( p_input->p_sout, p_buffer ); 
     256        return VLC_SUCCESS; 
     257    } 
     258 
    253259    vlc_mutex_lock( &p_sout->lock ); 
    254     i_ret = p_sout->p_stream->pf_send( p_sout->p_stream, p_input->id, p_buffer ); 
     260    i_ret = p_sout->p_stream->pf_send( p_sout->p_stream, 
     261                                       p_input->id, p_buffer ); 
    255262    vlc_mutex_unlock( &p_sout->lock ); 
    256263