Changeset 2f322e1f19b0ea622f5970f80d69eaa67bbcb836
- Timestamp:
- 10/05/05 12:38:35
(4 years ago)
- Author:
- Gildas Bazin <gbazin@videolan.org>
- git-committer:
- Gildas Bazin <gbazin@videolan.org> 1115721515 +0000
- git-parent:
[d32d1ee048f47f34457f1c8529915569d7c7c07a]
- git-author:
- Gildas Bazin <gbazin@videolan.org> 1115721515 +0000
- Message:
* modules/codec/ffmpeg/*, modules/stream_out/switcher.c: fix compilation with new ffmpeg versions (use native timebase).
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| r004f8aa |
r2f322e1 |
|
| 329 | 329 | p_context->height = p_enc->fmt_in.video.i_height; |
|---|
| 330 | 330 | |
|---|
| | 331 | #if LIBAVCODEC_BUILD >= 4754 |
|---|
| | 332 | p_context->time_base.num = p_enc->fmt_in.video.i_frame_rate_base; |
|---|
| | 333 | p_context->time_base.den = p_enc->fmt_in.video.i_frame_rate; |
|---|
| | 334 | #else |
|---|
| 331 | 335 | p_context->frame_rate = p_enc->fmt_in.video.i_frame_rate; |
|---|
| 332 | 336 | p_context->frame_rate_base= p_enc->fmt_in.video.i_frame_rate_base; |
|---|
| | 337 | #endif |
|---|
| 333 | 338 | |
|---|
| 334 | 339 | /* Defaults from ffmpeg.c */ |
|---|
| ra234cf4 |
r2f322e1 |
|
| 187 | 187 | } |
|---|
| 188 | 188 | |
|---|
| | 189 | #if LIBAVCODEC_BUILD >= 4754 |
|---|
| | 190 | if( p_context->time_base.num > 0 && p_context->time_base.den > 0 ) |
|---|
| | 191 | { |
|---|
| | 192 | p_dec->fmt_out.video.i_frame_rate = p_context->time_base.den; |
|---|
| | 193 | p_dec->fmt_out.video.i_frame_rate_base = p_context->time_base.num; |
|---|
| | 194 | } |
|---|
| | 195 | #else |
|---|
| 189 | 196 | if( p_context->frame_rate > 0 && p_context->frame_rate_base > 0 ) |
|---|
| 190 | 197 | { |
|---|
| … | … | |
| 192 | 199 | p_dec->fmt_out.video.i_frame_rate_base = p_context->frame_rate_base; |
|---|
| 193 | 200 | } |
|---|
| | 201 | #endif |
|---|
| 194 | 202 | |
|---|
| 195 | 203 | p_pic = p_dec->pf_vout_buffer_new( p_dec ); |
|---|
| … | … | |
| 655 | 663 | |
|---|
| 656 | 664 | /* interpolate the next PTS */ |
|---|
| | 665 | #if LIBAVCODEC_BUILD >= 4754 |
|---|
| | 666 | if( p_sys->p_context->time_base.den > 0 ) |
|---|
| | 667 | { |
|---|
| | 668 | p_sys->i_pts += I64C(1000000) * |
|---|
| | 669 | (2 + p_sys->p_ff_pic->repeat_pict) * |
|---|
| | 670 | p_sys->p_context->time_base.num * |
|---|
| | 671 | p_block->i_rate / INPUT_RATE_DEFAULT / |
|---|
| | 672 | (2 * p_sys->p_context->time_base.den); |
|---|
| | 673 | } |
|---|
| | 674 | #else |
|---|
| 657 | 675 | if( p_sys->p_context->frame_rate > 0 ) |
|---|
| 658 | 676 | { |
|---|
| … | … | |
| 663 | 681 | (2 * p_sys->p_context->frame_rate); |
|---|
| 664 | 682 | } |
|---|
| | 683 | #endif |
|---|
| 665 | 684 | |
|---|
| 666 | 685 | if( p_sys->b_first_frame ) |
|---|
| r23f9442 |
r2f322e1 |
|
| 741 | 741 | i_aspect_den * (int64_t)id->ff_enc_c->width, 1 << 30 ); |
|---|
| 742 | 742 | |
|---|
| | 743 | #if LIBAVCODEC_BUILD >= 4754 |
|---|
| | 744 | id->ff_enc_c->time_base.num = 1; |
|---|
| | 745 | id->ff_enc_c->time_base.den = 25; /* FIXME */ |
|---|
| | 746 | #else |
|---|
| 743 | 747 | id->ff_enc_c->frame_rate = 25; /* FIXME */ |
|---|
| 744 | 748 | id->ff_enc_c->frame_rate_base = 1; |
|---|
| | 749 | #endif |
|---|
| 745 | 750 | |
|---|
| 746 | 751 | id->ff_enc_c->gop_size = 200; |
|---|