Changeset 36f1fb3fcd939191caded7d94458ba49e44ce5bb
- 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
| r1c33260 |
r36f1fb3 |
|
| 3 | 3 | ***************************************************************************** |
|---|
| 4 | 4 | * 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 $ |
|---|
| 6 | 6 | * |
|---|
| 7 | 7 | * Authors: Laurent Aimar <fenrir@via.ecp.fr> |
|---|
| … | … | |
| 250 | 250 | return; |
|---|
| 251 | 251 | } |
|---|
| 252 | | if( p_pack->i_pts_start < 0 && p_pes->i_pts > 0 ) |
|---|
| | 252 | if( p_pack->i_pts_start < 0 ) |
|---|
| 253 | 253 | { |
|---|
| 254 | 254 | p_pack->i_pts_start = p_pes->i_pts; |
|---|
| 255 | 255 | } |
|---|
| | 256 | |
|---|
| 256 | 257 | i_size = p_pes->i_pes_size; |
|---|
| 257 | 258 | if( i_size > 0 ) |
|---|
| … | … | |
| 358 | 359 | p_bih->biHeight = 0; |
|---|
| 359 | 360 | 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" */ |
|---|
| 362 | 363 | p_bih->biSizeImage = 0; |
|---|
| 363 | 364 | p_bih->biXPelsPerMeter = 0; |
|---|
| … | … | |
| 388 | 389 | if( p_pes_next ) |
|---|
| 389 | 390 | { |
|---|
| 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; |
|---|
| 391 | 408 | } |
|---|
| 392 | 409 | sout_InputSendBuffer( p_pack->p_sout_input, |
|---|