Changeset 455c49fbd5f5b92f5c9bbc279c967ac713361b7a
- Timestamp:
- 17/05/05 15:49:31
(4 years ago)
- Author:
- Gildas Bazin <gbazin@videolan.org>
- git-committer:
- Gildas Bazin <gbazin@videolan.org> 1116337771 +0000
- git-parent:
[fb751f6e275e31a69d81502d030a3fbaf5514831]
- git-author:
- Gildas Bazin <gbazin@videolan.org> 1116337771 +0000
- Message:
* modules/mux/mpeg/ts.c: fixed FixPES().
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| r393c3c5 |
r455c49f |
|
| 181 | 181 | *****************************************************************************/ |
|---|
| 182 | 182 | static const char *ppsz_sout_options[] = { |
|---|
| 183 | | "pid-video", "pid-audio", "pid-spu", "pid-pmt", "tsid", "program-pmt", "es-id-pid", |
|---|
| 184 | | "shaping", "pcr", "bmin", "bmax", "use-key-frames", "dts-delay", |
|---|
| 185 | | "csa-ck", "crypt-audio", |
|---|
| | 183 | "pid-video", "pid-audio", "pid-spu", "pid-pmt", "tsid", "program-pmt", |
|---|
| | 184 | "es-id-pid", "shaping", "pcr", "bmin", "bmax", "use-key-frames", |
|---|
| | 185 | "dts-delay", "csa-ck", "crypt-audio", |
|---|
| 186 | 186 | NULL |
|---|
| 187 | 187 | }; |
|---|
| … | … | |
| 1345 | 1345 | { |
|---|
| 1346 | 1346 | block_t *p_next; |
|---|
| | 1347 | int i_copy; |
|---|
| | 1348 | |
|---|
| 1347 | 1349 | p_data = block_FifoGet( p_fifo ); |
|---|
| 1348 | 1350 | p_data = block_Realloc( p_data, 0, STD_PES_PAYLOAD ); |
|---|
| … | … | |
| 1354 | 1356 | p_data->i_dts = p_next->i_dts; |
|---|
| 1355 | 1357 | } |
|---|
| | 1358 | i_copy = __MIN( STD_PES_PAYLOAD - i_size, p_next->i_buffer ); |
|---|
| | 1359 | |
|---|
| 1356 | 1360 | p_mux->p_vlc->pf_memcpy( &p_data->p_buffer[i_size], p_next->p_buffer, |
|---|
| 1357 | | STD_PES_PAYLOAD - i_size ); |
|---|
| 1358 | | p_next->i_pts += p_next->i_length * (STD_PES_PAYLOAD - i_size) |
|---|
| 1359 | | / p_next->i_buffer; |
|---|
| 1360 | | p_next->i_dts += p_next->i_length * (STD_PES_PAYLOAD - i_size) |
|---|
| 1361 | | / p_next->i_buffer; |
|---|
| 1362 | | p_next->i_length -= p_next->i_length * (STD_PES_PAYLOAD - i_size) |
|---|
| 1363 | | / p_next->i_buffer; |
|---|
| 1364 | | p_next->i_buffer -= STD_PES_PAYLOAD - i_size; |
|---|
| 1365 | | p_next->p_buffer += STD_PES_PAYLOAD - i_size; |
|---|
| | 1361 | i_copy ); |
|---|
| | 1362 | p_next->i_pts += p_next->i_length * i_copy / p_next->i_buffer; |
|---|
| | 1363 | p_next->i_dts += p_next->i_length * i_copy / p_next->i_buffer; |
|---|
| | 1364 | p_next->i_length -= p_next->i_length * i_copy / p_next->i_buffer; |
|---|
| | 1365 | p_next->i_buffer -= i_copy; |
|---|
| | 1366 | p_next->p_buffer += i_copy; |
|---|
| 1366 | 1367 | p_next->i_flags |= BLOCK_FLAG_NO_KEYFRAME; |
|---|
| | 1368 | |
|---|
| | 1369 | if( !p_next->i_buffer ) |
|---|
| | 1370 | { |
|---|
| | 1371 | p_next = block_FifoGet( p_fifo ); |
|---|
| | 1372 | block_Release( p_next ); |
|---|
| | 1373 | } |
|---|
| 1367 | 1374 | return p_data; |
|---|
| 1368 | 1375 | } |
|---|