Changeset b691d5d74ab962f1d9717cdfa2c576925d903116
- Timestamp:
- 21/11/07 19:02:04
(11 months ago)
- Author:
- Christophe Massiot <massiot@videolan.org>
- git-committer:
- Christophe Massiot <massiot@videolan.org> 1195668124 +0000
- git-parent:
[d4bbae044e7958a24d21cc4b80bd663d61e6d9a3]
- git-author:
- Christophe Massiot <massiot@videolan.org> 1195668124 +0000
- Message:
- modules/codec/x264.c: Fixed DTS when adaptive B frames are used (still
wrong for bpyramid, though).
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| r6ee1e19 |
rb691d5d |
|
| 670 | 670 | uint8_t *p_buffer; |
|---|
| 671 | 671 | |
|---|
| 672 | | mtime_t i_last_ref_pts; |
|---|
| | 672 | mtime_t i_interpolated_dts; |
|---|
| 673 | 673 | |
|---|
| 674 | 674 | char *psz_stat_name; |
|---|
| … | … | |
| 721 | 721 | p_enc->pf_encode_audio = NULL; |
|---|
| 722 | 722 | p_enc->p_sys = p_sys = malloc( sizeof( encoder_sys_t ) ); |
|---|
| 723 | | p_sys->i_last_ref_pts = 0; |
|---|
| | 723 | p_sys->i_interpolated_dts = 0; |
|---|
| 724 | 724 | p_sys->psz_stat_name = NULL; |
|---|
| 725 | 725 | |
|---|
| … | … | |
| 1240 | 1240 | p_enc->fmt_in.video.i_frame_rate; |
|---|
| 1241 | 1241 | |
|---|
| 1242 | | p_block->i_dts = p_block->i_pts = pic.i_pts; |
|---|
| | 1242 | p_block->i_pts = pic.i_pts; |
|---|
| 1243 | 1243 | |
|---|
| 1244 | 1244 | if( p_sys->param.i_bframe > 0 ) |
|---|
| … | … | |
| 1246 | 1246 | if( p_block->i_flags & BLOCK_FLAG_TYPE_B ) |
|---|
| 1247 | 1247 | { |
|---|
| | 1248 | /* FIXME : this is wrong if bpyramid is set */ |
|---|
| 1248 | 1249 | p_block->i_dts = p_block->i_pts; |
|---|
| | 1250 | p_sys->i_interpolated_dts = p_block->i_dts; |
|---|
| 1249 | 1251 | } |
|---|
| 1250 | 1252 | else |
|---|
| 1251 | 1253 | { |
|---|
| 1252 | | if( p_sys->i_last_ref_pts ) |
|---|
| | 1254 | if( p_sys->i_interpolated_dts ) |
|---|
| 1253 | 1255 | { |
|---|
| 1254 | | p_block->i_dts = p_sys->i_last_ref_pts; |
|---|
| | 1256 | p_block->i_dts = p_sys->i_interpolated_dts; |
|---|
| 1255 | 1257 | } |
|---|
| 1256 | 1258 | else |
|---|
| … | … | |
| 1260 | 1262 | } |
|---|
| 1261 | 1263 | |
|---|
| 1262 | | p_sys->i_last_ref_pts = p_block->i_pts; |
|---|
| | 1264 | p_sys->i_interpolated_dts += p_block->i_length; |
|---|
| 1263 | 1265 | } |
|---|
| | 1266 | } |
|---|
| | 1267 | else |
|---|
| | 1268 | { |
|---|
| | 1269 | p_block->i_dts = p_block->i_pts; |
|---|
| 1264 | 1270 | } |
|---|
| 1265 | 1271 | |
|---|