Changeset 6de833a425913c7f4fc6d0ef1b77dbd13f10526e
- Timestamp:
- 02/11/04 21:52:45
(4 years ago)
- Author:
- Derk-Jan Hartman <hartman@videolan.org>
- git-committer:
- Derk-Jan Hartman <hartman@videolan.org> 1099428765 +0000
- git-parent:
[7216315d85b2395b7adfbe5fda75f9f83564266e]
- git-author:
- Derk-Jan Hartman <hartman@videolan.org> 1099428765 +0000
- Message:
* fixed a problem with sub-fps overriding
If subtitle format doesn't have their own reference, they should define 25fps as the the standard reference, BUT NOT GLOBALLY. Cause then ALL subtitle formats will use this correction factor of 25fps.
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| r62f7a58 |
r6de833a |
|
| 191 | 191 | |
|---|
| 192 | 192 | /* Get the FPS */ |
|---|
| 193 | | p_sys->i_microsecperframe = 40000; /* default to 25 fps */ |
|---|
| 194 | 193 | f_fps = var_CreateGetFloat( p_demux, "sub-fps" ); |
|---|
| 195 | 194 | if( f_fps >= 1.0 ) |
|---|
| 196 | 195 | { |
|---|
| 197 | 196 | p_sys->i_microsecperframe = (int64_t)( (float)1000000 / f_fps ); |
|---|
| | 197 | } |
|---|
| | 198 | else |
|---|
| | 199 | { |
|---|
| | 200 | p_sys->i_microsecperframe = 0; |
|---|
| 198 | 201 | } |
|---|
| 199 | 202 | |
|---|
| … | … | |
| 681 | 684 | unsigned int i; |
|---|
| 682 | 685 | |
|---|
| | 686 | int i_microsecperframe = 40000; /* default to 25 fps */ |
|---|
| | 687 | if( p_sys->i_microsecperframe > 0 ) |
|---|
| | 688 | i_microsecperframe = p_sys->i_microsecperframe; |
|---|
| | 689 | |
|---|
| 683 | 690 | p_subtitle->i_start = 0; |
|---|
| 684 | 691 | p_subtitle->i_stop = 0; |
|---|
| … | … | |
| 710 | 717 | } |
|---|
| 711 | 718 | |
|---|
| 712 | | p_subtitle->i_start = (int64_t)i_start * p_sys->i_microsecperframe; |
|---|
| 713 | | p_subtitle->i_stop = (int64_t)i_stop * p_sys->i_microsecperframe; |
|---|
| | 719 | p_subtitle->i_start = (int64_t)i_start * i_microsecperframe; |
|---|
| | 720 | p_subtitle->i_stop = (int64_t)i_stop * i_microsecperframe; |
|---|
| 714 | 721 | p_subtitle->psz_text = strndup( buffer_text, MAX_LINE ); |
|---|
| 715 | 722 | return( 0 ); |
|---|