Commit 10b01ed4 authored by Laurent Aimar's avatar Laurent Aimar

* mpegvideo.c: try to set a better value for length. (I am not sure it is

 the good one but it give far better result). dts/pts/length computation
 should be verified.
parent ae141f9a
......@@ -2,7 +2,7 @@
* mpegvideo.c
*****************************************************************************
* Copyright (C) 2001, 2002 VideoLAN
* $Id: mpegvideo.c,v 1.15 2003/06/10 22:42:59 gbazin Exp $
* $Id: mpegvideo.c,v 1.16 2003/08/10 22:13:05 fenrir Exp $
*
* Authors: Laurent Aimar <fenrir@via.ecp.fr>
* Eric Petit <titer@videolan.org>
......@@ -510,15 +510,21 @@ static void PacketizeThread( packetizer_t *p_pack )
{
/* Trivial case (DTS == PTS) */
p_pack->i_interpolated_dts += i_duration;
p_sout_buffer->i_length = i_duration;
}
else
{
p_pack->i_interpolated_dts += p_pack->i_old_duration;
p_sout_buffer->i_length = p_pack->i_old_duration;
p_pack->i_old_duration = i_duration;
}
p_sout_buffer->i_bitrate = (int)( 8 * i_pos * p_pack->d_frame_rate );
p_sout_buffer->i_length = i_duration;
#if 0
msg_Dbg( p_pack->p_fifo, "------------> dts=%lld pts=%lld duration=%lld",
p_sout_buffer->i_dts, p_sout_buffer->i_pts,
p_sout_buffer->i_length );
#endif
sout_InputSendBuffer( p_pack->p_sout_input, p_sout_buffer );
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment