Changeset 36f1fb3fcd939191caded7d94458ba49e44ce5bb

Show
Ignore:
Timestamp:
12/01/03 05:11:35 (6 years ago)
Author:
Laurent Aimar <fenrir@videolan.org>
git-committer:
Laurent Aimar <fenrir@videolan.org> 1042344695 +0000
git-parent:

[551de919b33a96f33aa0f503045189a6b5cdae1a]

git-author:
Laurent Aimar <fenrir@videolan.org> 1042344695 +0000
Message:
  • some workaround for clock.
Files:

Legend:

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

    r1c33260 r36f1fb3  
    33 ***************************************************************************** 
    44 * Copyright (C) 2001, 2002 VideoLAN 
    5  * $Id: mpeg4video.c,v 1.3 2003/01/08 10:26:49 fenrir Exp $ 
     5 * $Id: mpeg4video.c,v 1.4 2003/01/12 04:11:35 fenrir Exp $ 
    66 * 
    77 * Authors: Laurent Aimar <fenrir@via.ecp.fr> 
     
    250250        return; 
    251251    } 
    252     if( p_pack->i_pts_start < 0 && p_pes->i_pts > 0
     252    if( p_pack->i_pts_start < 0
    253253    { 
    254254        p_pack->i_pts_start = p_pes->i_pts; 
    255255    } 
     256 
    256257    i_size = p_pes->i_pes_size; 
    257258    if( i_size > 0 ) 
     
    358359                    p_bih->biHeight = 0; 
    359360                    p_bih->biPlanes = 1; 
    360                     p_bih->biBitCount = 0
    361                     p_bih->biCompression = 0; /* FIXME */ 
     361                    p_bih->biBitCount = 24
     362                    p_bih->biCompression = 0x64697678; /* "divx" */ 
    362363                    p_bih->biSizeImage = 0; 
    363364                    p_bih->biXPelsPerMeter = 0; 
     
    388389        if( p_pes_next ) 
    389390        { 
    390             p_sout_buffer->i_length = p_pes_next->i_pts - p_pes->i_pts; 
     391            mtime_t i_gap; 
     392 
     393            i_gap = p_pes_next->i_pts - p_pes->i_pts; 
     394 
     395            if( i_gap > 1000000 / 80 )  // too big fps > 80 is no sense 
     396            { 
     397                i_gap = 1000000 / 25; 
     398                p_pack->i_pts_start = 
     399                    ( p_pes->i_pts - p_pack->i_pts_start ) + p_pes_next->i_pts - i_gap; 
     400            } 
     401            else if( i_gap < 0 ) 
     402            { 
     403                p_pack->i_pts_start = 
     404                    ( p_pes->i_pts - p_pack->i_pts_start ) + p_pes_next->i_pts; 
     405                i_gap = 0; 
     406            } 
     407            p_sout_buffer->i_length = i_gap; 
    391408        } 
    392409        sout_InputSendBuffer( p_pack->p_sout_input,